-
Notifications
You must be signed in to change notification settings - Fork 325
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
chore(IDX): introduce the pocket_ic_test macro #3268
Open
basvandijk
wants to merge
11
commits into
master
Choose a base branch
from
basvandijk/pocket-ic-test-macro
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
24b4b46
chore(IDX): introduce the pocket_ic_test macro
basvandijk 7a43225
fix
basvandijk d675046
fix
basvandijk 4b43428
fix
basvandijk bf11753
Merge branch 'master' into basvandijk/pocket-ic-test-macro
basvandijk 66caca6
wip
basvandijk 6768ad0
Merge remote-tracking branch 'origin/master' into basvandijk/pocket-i…
basvandijk 4954d89
Merge remote-tracking branch 'origin/master' into basvandijk/pocket-i…
basvandijk 2d12f40
rename macro -> test_rule
basvandijk 868c402
forgot to commit this file
basvandijk ea7b46c
add link to issue
basvandijk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'm not too fond of small macros that just wrap a target and inject dependencies; I find they tend to add complexity and obfuscate what is really happening, making everything harder to follow and debug, especially when e.g. the
test_rule
needs to be specified.Is the goal here mostly to avoid repetition? Do we have a ticket we can link to re. the sandbox issue on Darwin?
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.
Context is in this thread. I would like to have a central place where we do work-arounds for that sandbox issue on darwin and not scatter it all over our code base.
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.
I see; agree it's a good idea to have a central place for the workaround but I don't think this requires implicitly injecting
pocket-ic
. How about modifyingrust_ic_test
to addrequires-network
ifpocket-ic
is a dependency?Also, can you add a ticket so that we can track the issue upstream and remove the workaround once it's fixed?
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.
That seems rather hacky and an implicit rule like that could lead to surprises. Also it's not just
rust_ic_test
that needs to be modified but alsorust_test
,rust_test_suite
andrust_test_suite_with_extra_srcs
. Or do they all resolve back torust_test
?Good idea: https://dfinity.atlassian.net/browse/IDX-3192
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.
Sorry, I meant a ticket upstream on bazel! With just an internal ticket I doubt we'll follow up & make progress on this
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.
This seems like a similar issue: bazelbuild/bazel#14828. Let me study that a bit more later.
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.
There seems to be a work around by using IPv6 instead of IPv4. @mraszyk maybe that's something you can look into.