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

Git dependency in extra-deps doesn't work if specified commit isn't reachable from remote HEAD #38

Closed
isomorpheme opened this issue Nov 16, 2023 · 1 comment · Fixed by #39

Comments

@isomorpheme
Copy link

isomorpheme commented Nov 16, 2023

For example, having something like:

- git: https://github.com/circuithub/ghc-source-gen.git
  commit: 7a6aac047b706508e85ba2054b5bedbecfd7eb7a

in extra-deps fails with an error like:

error: Cannot find Git revision '7a6aac047b706508e85ba2054b5bedbecfd7eb7a' in ref 'refs/heads/master' of repository 'https://github.com/circuithub/ghc-source-gen.git'! Please make sure that the rev exists on the ref you've specified or add allRefs = true; to fetchGit.

I think this is because of this fetchGit call:

rawSrc = builtins.fetchGit {
url = haskPkgLock.git;
name = srcName;
rev = haskPkgLock.commit;
};

Adding allRefs = true as the error suggests would solve this, but there's probably repos where it's much slower to do that, so maybe there's a cleverer solution, or it can just be made configurable?

geo2a pushed a commit to runtimeverification/hs-backend-booster that referenced this issue Nov 20, 2023
…ps (#376)

Temporary fix for
cdepillabout/stacklock2nix#38, until this is
(hopefully) fixed upstream
cdepillabout added a commit that referenced this issue Nov 22, 2023
Checkout #38 for an
explanation of where this is necessary.

This could be slower for large repositories, but it should match
`stack`'s default behavior better.
cdepillabout added a commit that referenced this issue Nov 22, 2023
Checkout #38 for an
explanation of where this is necessary.

This could be slower for large repositories, but it should match
`stack`'s default behavior better.
@cdepillabout cdepillabout linked a pull request Nov 22, 2023 that will close this issue
@cdepillabout
Copy link
Owner

Thanks for submitting this!

I released https://github.com/cdepillabout/stacklock2nix/releases/tag/v4.0.0, which uses your suggested fix from runtimeverification/hs-backend-booster@62139cd.

jberthold pushed a commit to runtimeverification/haskell-backend that referenced this issue Apr 10, 2024
jberthold pushed a commit to runtimeverification/haskell-backend that referenced this issue Apr 10, 2024
jberthold pushed a commit to runtimeverification/haskell-backend that referenced this issue Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants