-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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(remappings): check if remapping to add starts with existing remapping name #9246
Merged
Conversation
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
grandizzy
requested review from
DaniPopes,
klkvr,
mattsse,
yash-atreya and
zerosnacks
as code owners
November 4, 2024 06:55
zerosnacks
approved these changes
Nov 4, 2024
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, confirming this resolves #9146
$ forge test -vvvv --decode-internal
[⠊] Compiling...
[⠒] Compiling 26 files with Solc 0.8.28
[⠑] Solc 0.8.28 finished in 477.00ms
Compiler run successful!
Ran 1 test for test/ERC20Test.sol:CounterTest
[PASS] testTotalSupply() (gas: 10770)
Traces:
[10770] CounterTest::testTotalSupply()
├─ [2261] ERC20::totalSupply() [staticcall]
│ └─ ← [Return] 500000000 [5e8]
├─ [3201] StdAssertions::assertGt(500000000 [5e8], 0, "No token minted !")
│ ├─ [0] VM::assertGt(500000000 [5e8], 0, "No token minted !") [staticcall]
│ │ └─ ← [Return]
│ └─ ←
└─ ← [Stop]
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 1.77ms (671.20µs CPU time)
Ran 1 test suite in 52.59ms (1.77ms CPU time): 1 tests passed, 0 failed, 0 skipped (1 total tests)
with remappings:
@utils/=src/
forge-std/=lib/forge-std/src/
interesting-project/=lib/interesting-project/src/
as opposed to
@utils/=src/
@utils/libraries/=lib/interesting-project/src/
forge-std/=lib/forge-std/src/
interesting-project/=lib/interesting-project/src/
mattsse
approved these changes
Nov 4, 2024
leovct
pushed a commit
to leovct/foundry
that referenced
this pull request
Nov 6, 2024
…ping name (foundry-rs#9246) * fix(remappings): check if remapping to add starts with existing remapping name * Push remapping fn doesn't have to be pub, proper test remappings
2 tasks
grandizzy
added a commit
to grandizzy/foundry
that referenced
this pull request
Nov 6, 2024
…ng remapping name (foundry-rs#9246)" This reverts commit 455ba9b.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
Closes #9146
check if name of new remapping to be added starts with existing remapping name instead the other way around
e.g. if
@utils
remapping is already added in proj root then@utils/libraries
from lib should not be addedSolution