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

use --styleCheck:error #2242

Merged
merged 2 commits into from
May 30, 2024
Merged

use --styleCheck:error #2242

merged 2 commits into from
May 30, 2024

Conversation

tersec
Copy link
Contributor

@tersec tersec commented May 30, 2024

No description provided.

@jangko
Copy link
Contributor

jangko commented May 30, 2024

to compile evmc code path, use -d:evmc_enabled

@tersec
Copy link
Contributor Author

tersec commented May 30, 2024

Yeah, that uncovered one instance of this.

I'm not sure evmcStatus is the best one of these, and it's unfortunate Nim doesn't have a more direct way of allowing snake/camel cases within --styleCheck:error, but ensuring grep/rg/ag/GitHub web UI/etc will find symbols properly is worthwhile enough to change one symbol.

Open to suggestions of better alternatives to evmcStatus.

The constraints are:

  • status_code can't easily change, since that's part of the EVMC interface more directly, whereas this is not; and
  • just mirroring evmcStatusCode runs into some situations where there's also a variable name (not type name) of evmc_status_code.

@tersec
Copy link
Contributor Author

tersec commented May 30, 2024

I'm also not sure why the Fluffy CI sometimes runs and sometimes doesn't; presumably it's detecting the lack of applicable changes or similar, but config.nims in the root should affect it. It's possible that there are instances there, since it imports nimbus-eth2, which definitely can't directly use --styleCheck:error in places where the CL and EL worlds merge, especially around the engine API implementation, because precisely of this camel/snake case distinction between them. So long as Fluffy only imports some specific subsets of nimbus-eth2, it'll be fine, but it still would be better for CI to verify that.

@kdeme
Copy link
Contributor

kdeme commented May 30, 2024

'm also not sure why the Fluffy CI sometimes runs and sometimes doesn't; presumably it's detecting the lack of applicable changes or similar, but config.nims in the root should affect it.

Yes, that's selected here in the CI: https://github.com/status-im/nimbus-eth1/blob/master/.github/workflows/fluffy.yml#L12-L21

Seems like I never added config.nims in there.

@kdeme
Copy link
Contributor

kdeme commented May 30, 2024

FYI, Fluffy's code will still fail on styleCheck error currently. But because of https://github.com/status-im/nimbus-eth1/blob/master/fluffy/nim.cfg#L17, this change will still make it pass.

I can fix the style check errors separately .

@tersec
Copy link
Contributor Author

tersec commented May 30, 2024

Ok, merging, and the variable name can be updated later if someone prefers. The rest is fairly mechanical.

@tersec tersec merged commit 6a9ca40 into master May 30, 2024
9 checks passed
@tersec tersec deleted the IhO branch May 30, 2024 09:01
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.

None yet

3 participants