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: clean and normalize module imports #1591

Merged
merged 1 commit into from
Mar 6, 2023
Merged

fix: clean and normalize module imports #1591

merged 1 commit into from
Mar 6, 2023

Conversation

LNSD
Copy link
Contributor

@LNSD LNSD commented Mar 6, 2023

From discord (@arnetheduck):

hm, looks like some waku imports are a bit off - take for example https://github.com/waku-org/nwaku/blob/master/waku/v2/node/peer_manager/peer_manager.nim#L15 - the ../.. works because of an unfortunate quirk in Nim when compiling a top-level project in a suitable folder, but the file is actually not available in that location - instead, it actually resides in ../../../../waku/v2/protocol/waku_relay (or simply ../protocol/waku_relay) preventing the use of the module from "outside", ie when importing waku in a stand-alone application - I think this might be the leftover of some refactoring? cc @LNSD

This PR aims to fix this issue.

@LNSD LNSD self-assigned this Mar 6, 2023
@jakubgs
Copy link
Contributor

jakubgs commented Mar 6, 2023

Thanks! I tested this with our Nix derivation from:

And it works:

 > nix-build -A nim-waku .
/nix/store/z6x53di4xpk9j2lx0z2m75iznfjsyb57-nwaku-fb506e9196e2838b2dad08de011f120c62f46e90-fb506e91

 > $(nix-build -A nim-waku .)/bin/wakunode2 --version                                                                           
version / git commit hash: fb506e9196e2838b2dad08de011f120c62f46e90

Copy link
Contributor

@jm-clius jm-clius left a comment

Choose a reason for hiding this comment

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

LGTM, assuming it fixes the issue. (Sounds like it does.)

@LNSD LNSD merged commit 0bf8d57 into master Mar 6, 2023
@LNSD LNSD deleted the fix-clean-imports branch March 6, 2023 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants