-
Notifications
You must be signed in to change notification settings - Fork 57
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(tests): add missing import for tests #1375
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
waku/v2/README.md
Outdated
```bash | ||
# Get a shell with the right environment variables set | ||
./env.sh bash | ||
# Run a specific test | ||
nim c -r ./tests/v2/test_waku_filter.nim | ||
``` | ||
|
||
And and alter compile options as you want. For example, if you want a less verbose output you can do the following. For more, refer to the [compiler flags](https://nim-lang.org/docs/nimc.html#compiler-usage) and [chronicles documentation](https://github.com/status-im/nim-chronicles#compile-time-configuration). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And and alter compile options as you want. For example, if you want a less verbose output you can do the following. For more, refer to the [compiler flags](https://nim-lang.org/docs/nimc.html#compiler-usage) and [chronicles documentation](https://github.com/status-im/nim-chronicles#compile-time-configuration). | |
and alter compile options as you want. For example, if you want a less verbose output you can do the following. For more, refer to the [compiler flags](https://nim-lang.org/docs/nimc.html#compiler-usage) and [chronicles documentation](https://github.com/status-im/nim-chronicles#compile-time-configuration). |
Jenkins BuildsClick to see older builds (8)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM ✅
One question: are this changes adding an UnusedImport
warning to the test2
compilation logs? If so, then I would rather investigate a better approach that do not introduce those warnings and allows compiling the module individually.
Some context:
The amount of warnings we have is so high that is already causing "alert fatigue", and we can miss relevant issues for the PR. We need to address them as a maintenance chore.
I answer my question: Yes, they do. https://github.com/status-im/nwaku/actions/runs/3460521398/jobs/5777145106#step:7:44 Then, I would investigate a better approach that does not introduce those warnings and allows compiling the module individually. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for fixing this, as these individual tests have been broken for a while.
I agree with @LNSD about perhaps finding a way of doing this that does not increase compiler warnings (we've been struggling to stay ahead here due to Nim limitations). Is it possible to use the {.used.}
pragma (explained here) on the specific offending imports?
If there's no easy and clean way of avoiding the warnings, I think we should track it in a separate issue and come up with a strategy, but that would be subsequent to fixing the tests.
865e7b3
to
10dd360
Compare
@LNSD good catch. A simple approach could be to use this but I wouldn't like to have the test code full of these off/on statements. Another approach is to find the root cause of the issue and fix it properly, but have the feeling this will take some time. As I see it this has a really low prio, so I would manually disable the warnings as @jm-clius kind of suggested. |
What do you mean by "manually disable" the warnings? 👀 |
Disregard my comment. I was expecting this to work, but it does not. {. warning[UnusedImport]:off .}
import "sequtils"
{. warning[UnusedImport]:on .}
import "tables"
echo "hi there" But:
I was ofc expecting to warn only about |
What are the plans for this PR? Shall we close it and open an issue to investigate a solution? |
@LNSD will give it a shot before the end of the week. if it turns out to be too much, i would merge the PR and open an issue to track it. I think its better a "unused import" than a compile error. wdyt? |
Let's merge this. The issue here is incorrect compiler message of |
10dd360
to
873e587
Compare
e4de90c
to
1465de7
Compare
1465de7
to
d8ccfc7
Compare
Due to a missing import, some tests could not be run isolated. The issue can be reproduced as follows, and it applies to all modified tests where the
chronicles
import was added.