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

Toplevel alias for "cabal install --install-dependencies" #1484

Closed
tel opened this issue Sep 6, 2013 · 7 comments
Closed

Toplevel alias for "cabal install --install-dependencies" #1484

tel opened this issue Sep 6, 2013 · 7 comments

Comments

@tel
Copy link

tel commented Sep 6, 2013

One of the most frequent cabal-install command I use is cabal install --only-dependencies. While conceptually it makes sense to have this option under the install mode, it's somewhat inconvenient. I'd like for cabal deps to be an alias for cabal install --only-dependencies.

Compare, say, Bundler from the Rubygem ecosystem where the default command bundle creates and updates a local sandbox directly. It's a compelling workflow: git clone xxx; bundle.

If this were to happen, it would need to accept further command-line flags such as cabal deps --enable-tests -j2.

@23Skidoo
Copy link
Member

23Skidoo commented Sep 6, 2013

I think that a better solution is instead of special-casing install --only-dependencies to support command aliases (#1089).

Note also that you can save a few keystrokes by using --only-dep instead of --only-dependencies.

@tel
Copy link
Author

tel commented Sep 6, 2013

I agree completely. That subsumes my solution and need in a pretty flexible way.

@tibbe
Copy link
Member

tibbe commented Sep 6, 2013

It's my intention for cabal build to pull in any needed dependencies, starting with the next major release. Then we'll have

cabal sandbox init
cabal build

@tel
Copy link
Author

tel commented Sep 6, 2013

That'd be quite nice, too. Would there still be a "build according to the current packages" command? I'm imagining an edge case where unexpected package upgrades occur due to underspecification.

Joseph

On Fri, Sep 6, 2013 at 1:27 PM, Johan Tibell [email protected]
wrote:

It's my intention for cabal build to pull in any needed dependencies, starting with the next major release. Then we'll have

cabal sandbox init
cabal build

Reply to this email directly or view it on GitHub:
#1484 (comment)

@tibbe
Copy link
Member

tibbe commented Sep 6, 2013

We're handling that issue differently. There's now an option to put a cabal.config file in the package directory which can include a constraints section where you can lock down package versions. I believe this is similar to Ruby's gemlock files. Does this address your use case? If so we can close this issue.

@tel
Copy link
Author

tel commented Sep 7, 2013

Yeah, it sounds like this feature is already well covered. Glad to hear it and thanks for the great work Cabal maintainers 👍

@23Skidoo
Copy link
Member

23Skidoo commented Sep 7, 2013

Closing as duplicate of #1100 and #1089. Please reopen if you disagree.

@23Skidoo 23Skidoo closed this as completed Sep 7, 2013
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