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

qAddDependentFile is broken with new-install #5786

Open
hasufell opened this issue Dec 10, 2018 · 3 comments
Open

qAddDependentFile is broken with new-install #5786

hasufell opened this issue Dec 10, 2018 · 3 comments

Comments

@hasufell
Copy link
Member

minimal reproducible project https://github.com/hasufell/new-install-fail

new-install:

$ cabal new-install -j1 exe:new-install-fail
Wrote tarball sdist to
/home/maerwald/git/new-install-fail/dist-newstyle/sdist/new-install-fail-0.1.0.0.tar.gz
Resolving dependencies...
Build profile: -w ghc-8.6.2 -O1
In order, the following will be built (use -v for more details):
 - new-install-fail-0.1.0.0 (exe:new-install-fail) (requires build)
Configuring executable 'new-install-fail' for new-install-fail-0.1.0.0..
Preprocessing executable 'new-install-fail' for new-install-fail-0.1.0.0..
Building executable 'new-install-fail' for new-install-fail-0.1.0.0..
[1 of 1] Compiling Main             ( src/Main.hs, dist/build/new-install-fail/new-install-fail-tmp/Main.o )

<no location info>: error:
    resources/foo.md: openBinaryFile: does not exist (No such file or directory)
Warning: Some package(s) failed to build. Try rerunning with -j1 if you can't
see the error.

new-build:

$ cabal new-build -j1 exe:new-install-fail
Resolving dependencies...
Build profile: -w ghc-8.6.2 -O1
In order, the following will be built (use -v for more details):
 - new-install-fail-0.1.0.0 (exe:new-install-fail) (first run)
Configuring executable 'new-install-fail' for new-install-fail-0.1.0.0..
Preprocessing executable 'new-install-fail' for new-install-fail-0.1.0.0..
Building executable 'new-install-fail' for new-install-fail-0.1.0.0..
[1 of 1] Compiling Main             ( src/Main.hs, /home/maerwald/git/new-install-fail/dist-newstyle/build/x86_64-linux/ghc-8.6.2/new-install-fail-0.1.0.0/x/new-install-fail/build/new-install-fail/new-install-fail-tmp/Main.o )
Linking /home/maerwald/git/new-install-fail/dist-newstyle/build/x86_64-linux/ghc-8.6.2/new-install-fail-0.1.0.0/x/new-install-fail/build/new-install-fail/new-install-fail ...
@phadej
Copy link
Collaborator

phadej commented Dec 10, 2018

You don't specify

extra-source-files:
  resources/foo.md

in new-install-fail.cabal

@hasufell
Copy link
Member Author

Yeah, it seems cabal new-install switches to /tmp during build and then only includes what is the output of sdist right? While cabal new-build still works without.

@phadej
Copy link
Collaborator

phadej commented Dec 10, 2018

Yes, new-install does sdist and installs that package. That way installs can be hashed.

I tag this issue as documentation, as new-install for local packages is undocumented in the manual; it should really explain what happens (and especially why).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants