Closed DJViau closed 1 week ago
but https://github.com/transmissions11/solmate@branch/name/with-slashes
does not exist
what am I missing?
Would love this. Example: https://github.com/smartcontractkit/ccip/releases/tag/contracts-ccip%2Fv1.2.1
Closing, cannot reproduce
@Evalir
Closing, cannot reproduce
This is still an issue, and I'm currently experiencing it, can this be reopened. I have two branches, develop & feat/tokenWork, on this repo that can be used to reproduce.
Running the following works fine:
forge install mento-protocol/mento-core@develop
But running the install command using the branch that includes a slash I get this:
forge install mento-protocol/mento-core@feat/tokenWork
In the error logs you can see it cannot find the repository https://github.com/mento-protocol/mento-core@feat/tokenWork/
which is correct as that is not the correct URL for the branch. The correct URL is https://github.com/mento-protocol/mento-core/tree/feat/tokenWork
Forge version is: forge 0.2.0 (0f20cc6 2024-01-03T00:16:29.596863086Z)
Operating System : Ubuntu 22.04.3 LTS
interesting, thanks for reporting @bayological — will reopen
+1 here, we've found that if the tag name contains the character "/", forge install is unable to parse it, e.g. for a valid tag name of contracts-ccip/v1.2.1
forge install smartcontractkit/ccip@contracts-ccip/v1.2.1
foundry fails to parse the tag
Installing v1.2.1 in /Users/mattyang/Desktop/code/experiments/foundry-learn/foundry-starter-kit/lib/v1.2.1 (url: Some("https://github.com/smartcontractkit/ccip@contracts-ccip/v1.2.1"), tag: None)
then git cmd exits with code 128. This is not a problem if tag name does not contain "/"
I considered adding a @tag=
/ @branch=
arg but I think the UX friendly way (and already supported) is to specify the full path, for example
forge install smartcontractkit/ccip@contracts-ccip/v1.2.1
is actually
forge install smartcontractkit/ccip/releases/tag/contracts-ccip/v1.2.1
and a specific branch can be installed as
forge install smartcontractkit/ccip/tree/ng/memory-fix
We could though add options for forge install smartcontractkit/ccip@tag=contracts-ccip/v1.2.1
or forge install smartcontractkit/ccip@branch=ng/memory-fix
if better UX
@mattsse @zerosnacks @yash-atreya pls chime in
introducing @tag etc makes sense to me
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (2fc85cb 2023-10-05T00:18:04.223871000Z)
What command(s) is the bug in?
forge
Operating System
macOS (Apple Silicon)
Describe the bug
forge install transmissions11/solmate@branch/name/with-slashes
fails butforge install transmissions11/solmate@branch-name-with-dashes
works.The first outputs the erroneous message:
The second outputs the expected message:
I'm inferring that forge is splitting on
/
naively, which is messing up accessing the repo name and the tag.Edit:
This was clarified here: https://github.com/foundry-rs/foundry/issues/5996#issuecomment-2010030371