-
Notifications
You must be signed in to change notification settings - Fork 10
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 BiggestUInt #99
Conversation
It's a C++ backend-only phenomenon. Apparently https://github.com/status-im/nim-json-serialization/actions/runs/11107010807/job/30856615404 from last week (main It's not this PR, for sure -- I |
I'm guessing it's related to status-im/nim-unittest2@11f7cff @arnetheduck The |
Tried both refc and ORC, it's the same in both. And it's 100% repeatable, not a flaky memory corruption. Still investigating. But it is C++-only. With C:
|
Opened Nim bug nim-lang/Nim#24274 |
Seems reasonable. Prefer links to upstream Nim issues so in the future it's not a mystery (yes, Less critical in test code where can just try changing something and if it works it works, but, still useful. |
Added comment that links to the Nim issue, is it good enough? |
Sure, yeah. Now to see if it fixes CI. |
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
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)
As described in nim-lang/Nim#24269, stylecheck has a bug where it doesn't check the usage of symbols from the standard library. The tests for this library enable --styleCheck:error, so the style for stdlib symbols is fixed. In this library the only mismatching usage seems to be
BiggestUInt
.