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

fix stylecheck for UInt256 #226

Merged
merged 1 commit into from
Oct 10, 2024
Merged

fix stylecheck for UInt256 #226

merged 1 commit into from
Oct 10, 2024

Conversation

metagn
Copy link
Contributor

@metagn metagn commented Oct 10, 2024

As described in nim-lang/Nim#24269, stylecheck has a bug where it doesn't check the usage of symbols from other packages. The tests for this library enable --styleCheck:error, so the style for symbols from other packages is fixed. In this library the only mismatching usage seems to be UInt256.

@tersec tersec merged commit a222f44 into status-im:master Oct 10, 2024
18 checks passed
Araq pushed a commit to nim-lang/Nim that referenced this pull request Oct 11, 2024
fixes #24269, refs #20095

Instead of checking the package of the *used sym* to determine whether a
stylecheck should trigger, we check the package of the lineinfo instead.
Before #20095 this checked for the current compilation context module
instead which caused issues with generic procs, but the lineinfo should
more closely match the AST.

I figured this might cause issues with includes etc but the foreign
package test specifically tests for an include and passes, so maybe the
package determining logic accounts for this already. This still might
not be the correct logic, I'm not too familiar with the package handling
in the compiler.

Package PRs, both merged:

- json_rpc: status-im/nim-json-rpc#226
- json_serialization:
status-im/nim-json-serialization#99
narimiran pushed a commit to nim-lang/Nim that referenced this pull request Oct 11, 2024
fixes #24269, refs #20095

Instead of checking the package of the *used sym* to determine whether a
stylecheck should trigger, we check the package of the lineinfo instead.
Before #20095 this checked for the current compilation context module
instead which caused issues with generic procs, but the lineinfo should
more closely match the AST.

I figured this might cause issues with includes etc but the foreign
package test specifically tests for an include and passes, so maybe the
package determining logic accounts for this already. This still might
not be the correct logic, I'm not too familiar with the package handling
in the compiler.

Package PRs, both merged:

- json_rpc: status-im/nim-json-rpc#226
- json_serialization:
status-im/nim-json-serialization#99

(cherry picked from commit aaf6c40)
metagn added a commit to metagn/nim-json-rpc that referenced this pull request Oct 20, 2024
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.

2 participants