-
Notifications
You must be signed in to change notification settings - Fork 696
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
new-install: nonlocal exes #4825
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Consolodate the three copies of it.
There is nothing except for syntax support, but this is a first step towards proper support for targets refering to dependencies or to out of project packages. For the moment, when used, it will report: cabal: Cannot build the package foobar, it is not in this project (either directly or indirectly). If you want to add it to the project then edit the cabal.project file. Also update the test output for an integration test.
It's currently in the old Targets module, but we'll need it in the new-build code too soon, and it's not really that closely related to targets, so it makes sense to have it live in the common Types module.
That is, any package name within the install plan. This allows targeting a dependency of a package that is local to the project.
So you can now add `extra-packages: foo` to the cabal.projct file and then `cabal (new-)build foo`. The extra packages are included into the install plan and they are also resolved as build targets. Currently this only uses the "any valid package name" target syntax which means you can use `foo` but not `foo:tests` or any of the other variations.
Add the first part of the new-install command: nonlocal exes. See haskell#4558 for the design concept. This part of the command installs executables from outside of a project (ie from hackage) in the store and then symlinks them in the cabal bin directory. This is done by creating a dummy project and adding the targets as extra packages.
BardurArantsson
approved these changes
Oct 27, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I think this is pretty low-risk to just merge and then fix any issues later? (Seeing as it's a new command.)
BardurArantsson
approved these changes
Oct 27, 2017
[ci skip]
Oh well, I'll just merge this. Tests and docs will be in another pr |
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add the first part of the new-install command: nonlocal exes.
See #4558 for the design concept.
This part of the command installs executables from outside of a project
(ie from hackage) in the store and then symlinks them in the cabal bin
directory.
This is done by creating a dummy project and adding the targets as extra
packages.
Some questions:
~/.cabal/bin
directory? I couldn't find it in the old install command. Is it hardcoded somewhere? Do I have to hardcode it? What about windows?includes and closes #4734
ping @dcoutts @hvr