-
Notifications
You must be signed in to change notification settings - Fork 842
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
Pantry does not work with git annex #4579
Comments
Note that if the directory already exists, |
I'd like stack to support git-annex, but I'm happy to consider it out of scope. This error ought to be handled, though. Would you mind taking a look, @qrilka? |
Actually, in this case I don't need any git-annex files to build the package so it ought to work. |
Sure, I will try to find time to investigate this |
@dbaynard this doesn't appear to be related to tar problems, e.g. I see the following verbose output:
See |
Yes:
We could theoretically make Pantry simply ignore broken symlinks, but the error we're getting here is due to more rigorous error checking. |
@dbaynard the only solution I could propose in this case is to add |
Yes, fixing the archive seems like the right way to do this. I'll try your suggestion. I wonder if there are other cases where archiving fails, too? Meanwhile:
This snippet shows the code which is throwing this error (the upper stack/subs/pantry/src/Pantry/Archive.hs Lines 384 to 393 in 7a076ab
Would line 385 be a good place to add that stack doesn't support git-annex, and provide a link to the workaround? |
@dbaynard that code deals with archives in general so I'm not sure we could talk explicitly about git-annex here, probably we could give some hint that it could be the reason behind such a failure but also there are other options - e.g. archive could come not from git at all and bad symlinks could get put into it my some accident. |
@dbaynard what do you think could be a proper resolution for this issue? |
This sounds like an improvement. |
This works. Thanks @qrilka! I'll PR with some documentation. |
running into issues building hx-deploy-tool , according to the error message, this fixes the problem commercialhaskell/stack#4579
Latest stack doesn't seem to support named commits such as 'master'. Get the commit sha from `git rev-parse` and append it to the yaml file. This doesn't fix google#391 but goes one step further. We still get an error like: $ stack runghc -- bootstrap.hs Cloning 0bef8c2 from https://github.com/google/proto-lens Unsupported tarball from /tmp/with-repo-archive189930/foo.tar: Symbolic link dest not found from proto-lens/proto-lens-imports/google to ../../google/protobuf/src/google, looking for proto-lens/../google/protobuf/src/google. This may indicate that the source is a git archive which uses git-annex. See commercialhaskell/stack#4579 for further information. bootstrap.hs: readCreateProcess: stack "--stack-yaml=stack-bootstrap.yaml" "path" "--local-install-root" (exit 1): failed
Latest stack doesn't seem to support named commits such as 'master'. Get the commit sha from `git rev-parse` and append it to the yaml file. This doesn't fix #391 but goes one step further. We still get an error like: $ stack runghc -- bootstrap.hs Cloning 0bef8c2 from https://github.com/google/proto-lens Unsupported tarball from /tmp/with-repo-archive189930/foo.tar: Symbolic link dest not found from proto-lens/proto-lens-imports/google to ../../google/protobuf/src/google, looking for proto-lens/../google/protobuf/src/google. This may indicate that the source is a git archive which uses git-annex. See commercialhaskell/stack#4579 for further information. bootstrap.hs: readCreateProcess: stack "--stack-yaml=stack-bootstrap.yaml" "path" "--local-install-root" (exit 1): failed
…stack` deleted dead symlink "cddl-spec" The presence of an invalid link leads to an error in the `cardano-node` build via `stack`. See commercialhaskell/stack#4579 for further information.
Right now the following `stack.yaml`: ``` extra-deps: - git: https://github.com/hspec/hspec commit: c38a03d ``` Yields: ``` Cloning c38a03d from https://github.com/hspec/hspec Error: [S-760] Unsupported tarball from /dev/shm/drlkf/with-repo-archive2139961/foo.tar: Symbolic link dest not found from hspec-meta/vendor to hspec-core/vendor/, looking for hspec-meta/hspec-core/vendor. This may indicate that the source is a git archive which uses git-annex. See commercialhaskell/stack#4579 for further information. ``` See also: commercialhaskell/stack#5004
Right now the following `stack.yaml`: ``` extra-deps: - git: https://github.com/hspec/hspec commit: c38a03d ``` Yields: ``` Cloning c38a03d from https://github.com/hspec/hspec Error: [S-760] Unsupported tarball from /dev/shm/drlkf/with-repo-archive2139961/foo.tar: Symbolic link dest not found from hspec-meta/vendor to hspec-core/vendor/, looking for hspec-meta/hspec-core/vendor. This may indicate that the source is a git archive which uses git-annex. See commercialhaskell/stack#4579 for further information. ``` See also: commercialhaskell/stack#5004
Right now the following `stack.yaml`: ``` extra-deps: - git: https://github.com/hspec/hspec commit: c38a03d ``` Yields: ``` Cloning c38a03d from https://github.com/hspec/hspec Error: [S-760] Unsupported tarball from /dev/shm/drlkf/with-repo-archive2139961/foo.tar: Symbolic link dest not found from hspec-meta/vendor to hspec-core/vendor/, looking for hspec-meta/hspec-core/vendor. This may indicate that the source is a git archive which uses git-annex. See commercialhaskell/stack#4579 for further information. ``` See also: commercialhaskell/stack#5004
General summary/comments (optional)
Pantry does not support a git repo which uses git-annex.
Steps to reproduce
For example, using
master
:stack new no-annex --resolver https://gist.github.com/dbaynard/9693107a883a6282f52f22785d0072e2/raw/edd32d61464cf0e19236081e250aebbe8cea1112
The resolver includes a git repository which uses git-annex.
Expected
Stack to create the directory and populate with a
stack.yaml
file.Actual
Stack creates the directory, then attempts to resolve the git repos in the snapshot, fails with https://github.com/dbaynard/cascade, and so doesn't create the
stack.yaml
file. The command succeeds on 1.9.3.Verbose log
Stack version
I've no idea why it doesn't show the git ref.
Method of installation
Built from git repo.
The text was updated successfully, but these errors were encountered: