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. #1234

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

copybara-service[bot]
Copy link
Contributor

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.

This continues our work on #746.

…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`.

This continues our work on #746.

PiperOrigin-RevId: 603151738
@copybara-service copybara-service bot merged commit b02a658 into master Jan 31, 2024
@copybara-service copybara-service bot deleted the test_603142988 branch January 31, 2024 21:59
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