Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate most usages of Truth8.assertThat to equivalent usages of Truth.assertThat, and qualify others. #1793

Merged
1 commit merged into from
Jan 31, 2024

Conversation

copybara-service[bot]
Copy link

Migrate most usages of Truth8.assertThat to equivalent usages of Truth.assertThat, and qualify others.

By "qualify," I mean that, instead of static importing Truth8.assertThat, we write "Truth8.assertThat(...)" at the call site.

This is normally the opposite of what we recommend. However, it's a necessary step in our migration: We are copying all the Truth8 methods to Truth, and we can't do that if any files static import both Truth.assertThat and Truth8.assertThat (because it produces a compile error about ambiguous overloads). To unblock that, we're moving callers away from the static import.

We will update static analysis to stop suggesting the import.

A later step will migrate these callers to the new Truth.assertThat methods, which we will static import.

The Truth8 methods will be hidden in the future. All callers will use Truth.

@copybara-service copybara-service bot force-pushed the test_602806147 branch 2 times, most recently from 4927920 to 5a53750 Compare January 31, 2024 17:22
…ruth.assertThat`, and qualify others.

By "qualify," I mean that, instead of static importing `Truth8.assertThat`, we write "`Truth8.assertThat(...)`" at the call site.

This is normally the opposite of what we recommend. However, it's a necessary step in our migration: We are copying all the `Truth8` methods to `Truth`, and we can't do that if any files static import both `Truth.assertThat` and `Truth8.assertThat` (because it produces a compile error about ambiguous overloads). To unblock that, we're moving callers away from the static import.

We will update static analysis to stop suggesting the import.

A later step will migrate these callers to the new `Truth.assertThat` methods, which we will static import.

The `Truth8` methods will be hidden in the future. All callers will use `Truth`.

PiperOrigin-RevId: 603073706
@copybara-service copybara-service bot closed this pull request by merging all changes into master in 4f94f00 Jan 31, 2024
@copybara-service copybara-service bot deleted the test_602806147 branch January 31, 2024 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant