Skip to content

Conversation

@JonathanOppenheimer
Copy link
Member

@JonathanOppenheimer JonathanOppenheimer commented Nov 17, 2025

Syncs ava-labs/coreth#1279.

Note: The first commit 96fc992 is a perfect cherry pick of the coreth changes. These should not be reviewed stringently -- if you have changes, make them to coreth first~

The second commit 1a0ecea contains subnet-evm specific changes and should be reviewed as normal

--

  • Requesting @alarso16 for review as he was the original author.
  • Requesting @ceyonur for review as he was the merging reviewer.

@JonathanOppenheimer JonathanOppenheimer changed the title Jonathan oppenheimer/sync pr 1279 forbidgo sync: coreth PR #1279: style: forbidigo t.Fatal Nov 17, 2025
@JonathanOppenheimer JonathanOppenheimer self-assigned this Nov 17, 2025
@JonathanOppenheimer JonathanOppenheimer marked this pull request as ready for review November 17, 2025 17:28
@JonathanOppenheimer JonathanOppenheimer requested a review from a team as a code owner November 17, 2025 17:28
}
default:
t.Fatalf("unknown step: %d", step)
require.Failf(t, "unknown step", "got: %d", step)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an overreaching linter that replaces stdlib features with something that does nothing more than require the user to know that it's the same thing.

Copy link
Contributor

@alarso16 alarso16 Nov 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this linter to be added for the monorepo goal. Is there a better way of doing this? There could be a nolint clause instead

Copy link
Contributor

@alarso16 alarso16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point of the linter is to use the helper functions. require.Fail should be avoided whenever possible

@alarso16
Copy link
Contributor

What's with the goleak failures? It's weird because the TxSenderCacher is ignored in main_test.go, but for libevm.

Copy link
Contributor

@alarso16 alarso16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last comment probably

Copy link
Contributor

@alarso16 alarso16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should fix the licensing on this file and exclude these changes first

@JonathanOppenheimer JonathanOppenheimer force-pushed the JonathanOppenheimer/sync-pr-1279-forbidgo branch from 52bb4cd to 25db6a9 Compare November 19, 2025 21:50
@JonathanOppenheimer
Copy link
Member Author

We should fix the licensing on this file and exclude these changes first

Done -- see #1865

@JonathanOppenheimer
Copy link
Member Author

This blocked by this PR

Comment on lines +107 to +112
# - pattern: require\.Error$(# ErrorIs should be used instead)?
# - pattern: require\.ErrorContains$(# ErrorIs should be used instead)?
# - pattern: require\.EqualValues$(# Equal should be used instead)?
# - pattern: require\.NotEqualValues$(# NotEqual should be used instead)?
- pattern: ^(t|b|tb|f)\.(Fatal|Fatalf|Error|Errorf)$(# the require library should be used instead)?
- pattern: ^sort\.(Slice|Strings)$(# the slices package should be used instead)?
# - pattern: ^sort\.(Slice|Strings)$(# the slices package should be used instead)?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why these are commented out?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are commented out as to not make this PR overly large (and it's already a massive PR).

These linters will be added in a seperate PR.

// the next upgradeBytes. (only check the result on the last apply)
if i != len(tt.configs)-1 {
require.NoError(t, err, "expecting checkConfigCompatible call %d to return nil", i+1)
require.Nil(t, err, "expecting checkConfigCompatible call %d to return nil", i+1)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These actually have to be nil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants