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

Stack dependencies with subdirs are not supported #60

Open
AlexeyRaga opened this issue Jun 3, 2018 · 1 comment
Open

Stack dependencies with subdirs are not supported #60

AlexeyRaga opened this issue Jun 3, 2018 · 1 comment

Comments

@AlexeyRaga
Copy link

I have the following dependencies in my stack.yaml:

- location:
    git: git@github.com:arbor/antiope.git
    commit: ba073b0cd3847f6549960ecdd321259581582146
    subdirs:
      - antiope-core
      - antiope-s3
  extra-dep: true

But stackage2nix doesn't seem to like it:

error: unable to download 'git@github.com:arbor/antiope.git': URL using bad/illegal format or missing URL (3)
Initialized empty Git repository in /private/var/folders/3x/l50y6rts50j_9jqyp0fl7lqh0000gn/T/git-checkout-tmp-jsjeU0Lg/antiope-ba073b0/.git/
remote: Counting objects: 148, done.
remote: Compressing objects: 100% (73/73), done.
remote: Total 148 (delta 58), reused 118 (delta 30), pack-reused 0
Receiving objects: 100% (148/148), 17.06 KiB | 5.69 MiB/s, done.
Resolving deltas: 100% (58/58), done.
From github.com:arbor/antiope
 * [new branch]      master     -> origin/master
Switched to a new branch 'fetchgit'
removing `.git'...

git revision is ba073b0cd3847f6549960ecdd321259581582146
path is /nix/store/kws5gdwap71f0j9wmzmvmhkx08qn69zs-antiope-ba073b0
git human-readable version is -- none --
Commit date is 2018-05-28 11:59:58 +1000
hash is 0kgsfv29jjcw3h9c2s57wqnlygkkmav7yplwl6pfj9h7drvy99vw
*** found zero cabal files. Trying hpack...
*** hpack error: "/nix/store/kws5gdwap71f0j9wmzmvmhkx08qn69zs-antiope-ba073b0/package.yaml: Yaml file not found: /nix/store/kws5gdwap71f0j9wmzmvmhkx08qn69zs-antiope-ba073b0/package.yaml". Exiting.

The repository is public (https://github.com/arbor/antiope), and I don't understand why it initially says

error: unable to download 'git@github.com:arbor/antiope.git': URL using bad/illegal format or missing URL (3)

It seems that it can download the repo successfully anyway, but then it doesn't recognise that the actual packages are sitting in subfolders.
Both Stack and Nix allow subfolders, so perhaps something can be done on stackage2nix side to support them too.

@4e6
Copy link
Contributor

4e6 commented Jun 8, 2018

stackage2nix should support subdirs. Can it be a problem with indentation?

- location:
git: git@github.com:example/mega-repo
commit: 6a86ee32e5b869a877151f74064572225e1a0000
subdirs:
- subdir1
- subdir2

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

No branches or pull requests

2 participants