-
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
Git dependencies fail when they have some kinds of relative symlinks #5004
Comments
This bug is also preventing using https://github.com/google/proto-lens from being used as a git dependency, which used to work fine in
|
This bug also breaks building packages from a GHC repo:
|
I'm testing upgrade to It is a repo with several sub-repos. The main repo has a directory with some data, and all sub-repo's "test" directories contain a link to that main test data storage. So, it is actually a valid, rebuildable project, as all the data will always be present. Link is relative and its target is inside the repo. However, I'm more concerned with what would happen when a package is not under my control. A decision to not solving this, for whatever reason, justified or not, would leave me in a situation where I'd have to choose between (a) use I agree with @snoyberg's comment that we should strive for using only "correctly defined Haskell package" so that our project can be successfully rebuilt in the future, but that is not always possible. Maybe the solution would be to add a switch to ignore-symlink-error: true so that we, by ourselves, can make a decision of whether we should use such package(s) in our projects or not. Can some form of this solution be accepted? |
To be clear, I think this one is just a bug. The case with broken symlinks is arguably invalid in some sense. |
I've found that this breaks packages even if the symlinks are files which are completely inconsequential. For example, I have a repo where Stack complains about the symlink |
(cherry picked from commit 63ff2c6)
(cherry picked from commit 63ff2c6)
Any tips on how to work-around this at least temporarily? It's of course possible to fork upstream repositories and manually eliminate symlinks, but that's hardly ideal. One more project which is impossible to use because of this is ADL: https://github.com/timbod7/adl It contains a (valid) symlink from haskell/compiler/lib/adl/sys to adl/stdlib/sys/, which causes stack to choke:
it's odd because it seems that instead of following |
It broke stack 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
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)
We have are trying to use https://github.com/input-output-hk/plutus as a git dependency. New versions of Stack fail with a tarball error.
This is an offshoot from #4913 for the case that I think is definitely a bug.
Steps to reproduce
Add
to your
stack.yaml
andstack build
.Expected
It works.
Actual
Note that this link is not broken.
The link does have two levels of
..
in it, and if we look at what is actually being checked, the final path appears to still have one of the..
s in it, possibly this is related.Stack version
2.1.1.1 x86_64 hpack-0.31.2
Method of installation
Nix.
The text was updated successfully, but these errors were encountered: