-
Notifications
You must be signed in to change notification settings - Fork 841
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
Can't add repo to extra-deps if repo contains symlink to git submodule #5603
Comments
Isn't it a duplicate of #5536? |
✨ _**This is an old work account. Please reference @brandonchinn178 for all future communication**_ ✨
<!-- updated by mention_personal_account_in_comments.py -->
…---
I'm not sure. This issue is because theres a symlink pointing to a
directory containing the submodule. I'm not sure the other issue has the
symlink aspect to it.
On Sat, Aug 21, 2021, 2:24 PM Kirill Zaborsky ***@***.***> wrote:
Isn't it a duplicate of #5536
<#5536>?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5603 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGUC75IQ6YPZAI3FQ2BYIA3T6AKPJANCNFSM5CRB4KMQ>
.
|
✨ This is an old work account. Please reference @brandonchinn178 for all future communication ✨ To be clear, this isn't a duplicate of #5536 (or rather, this could be solved without solving #5536) because the i.e. if this line were simply changed to [] -> Right [] My build would work. So the |
I had a similar issue with submodules and spent some time trying to understand what is going on. The problem is that with extra-deps:
- github: google/proto-lens
On the other hand, this version executes extra-deps:
- git: https://github/google/proto-lens So, if some dependency uses git submodules you should replace Seems that this is not stated explicitly in documentation but probably it should. |
I am going to close this issue, because (a) it was based on the false premise that |
@mpilgrem can you elaborate? The crux of this issue is that using stack new test-project
cd test-project
git init
ln -sf nonexistent-file link-to-nonexistent-file
git add .
git commit -m "Initial commit" And use that repo as an |
@brandonchinn178, I am happy to elaborate. I'll refer to a Haskell package repository archive that contains a symlink other than to a file within the archive as 'malformed'. It seems to me that there are two broad categories of 'issue':
I understood your post first raising the issue here as being in the first category. However, it was mistaken. Stack/Pantry was not rejecting a repository archive that was not malformed. Rather, it was rejecting an archive that was malformed because it included symlinks to submodule files not included in the archive. The solution being to use I understand your recent example as being in the second category. That category is covered by #4913. |
Thanks for the explanation, that was helpful. Two things:
resolver: nightly-2023-08-10
packages: []
extra-deps:
- git: [email protected]:google/proto-lens.git
commit: 1378fbfbf44a3b529253aee1897d0e571f6c0ace
subdirs:
- proto-lens-protoc $ stack --version
Version 2.11.1, Git revision d06506a16289c6b90e6ffc0dcc8be7f80487ac07 (dirty) aarch64 hpack-0.35.2
$ stack build
Cloning 1378fbfbf44a3b529253aee1897d0e571f6c0ace from [email protected]:google/proto-lens.git
Error: [S-760]
Unsupported tarball from
/private/var/folders/4w/tywh16w5777ds8kzfzdm0_l40000gn/T/with-repo-archive59100/foo.tar:
Symbolic link dest not found from proto-lens-protobuf-types/proto-src to ../google/protobuf/src/, looking for google/protobuf/src.
This may indicate that the source is a git archive which uses git-annex.
See https://github.com/commercialhaskell/stack/issues/4579 for further information.
|
@brandonchinn178, I'm sorry I was mistaken about On SHA from a fork, that sounds a bit like commercialhaskell/pantry#73 (SHA from an unmerged pull request from a fork) (now fixed). |
General summary/comments (optional)
Relevant links:
Steps to reproduce
Then run
stack build
Expected
It should checkout the repo,
git submodule update
, then use it.Actual
It downloads the tar archive from GitHub and tries untarring it, with git submodules not included + symlinks not resolving.
Stack version
2.7.3
The text was updated successfully, but these errors were encountered: