-
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
forge update - Unable to find revision in submodule path #3720
Comments
@mattsse after more investigation, i think the issue is the
|
hmm, interesting, how do we fix this in the update command? |
@mattsse didn't find a way to update the module without removing the branch entry in the |
this sounds very cursed. I think I introduced this by checkout out the latest semver tag. |
perhaps related, |
I am getting this even without installing any libraries, i.e., in a new default project.
|
As of 29 Dec 2022, I am too facing this issue. |
I'm also encountering this issue, and can reproduce it in a brand new forge project by running:
The workaround as of right now seems to be removing and reinstalling my submodules. |
bump |
rn forge update just does
unclear what this error even means. I think this is somehow related to the git tag of the dependency but no idea honestly. So not sure what to actually do on |
facing the same issue while following along here |
I removed the branch specification from within the .gitmodules file and it was able to update again. Unfortunately, this means it won't continue to track the version I started with, but I suppose this is just how it will have to be for now. edit: Just had this issue crop up again on a new computer, found Option 3 on this site to be quite useful in resolving. |
face same issue, git submodules should not do what package managers do. |
i think the only real solution to this is to keep a persistent branch for every tag/release in each submodule. that branch can then be specified in the as noted before unfortunately the submodules functionality does not allow pinning to tags or commits. for |
➜ forge update
fatal: Needed a single revision
Unable to find current origin/master revision in submodule path 'lib/erc4626-tests'
Failed to recurse into submodule path 'lib/openzeppelin-contracts-upgradeable'
Error:
git submodule exited with code 1 OpenZeppelin has not specified a branch in the |
I'd recently started getting this again too. |
Marking as If this is not the case please leave a comment / re-open |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
0.2.0
What command(s) is the bug in?
forge update
Operating System
macOS (Apple Silicon)
Describe the bug
Hi there!
I've just started using foundry as a replacement of the hardhat (I really love the foundry idea ❤️ ).
I'm following the documentation and I realized that I have a small issue with
forge update
.Basically I installed openzeppelin contracts:
and if I execute a command
forge update
then I get an error:The
git submodule status
returns:Any idea what I'm doing wrong?
The text was updated successfully, but these errors were encountered: