Skip to content

Specifying package versions with --package #2496

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

Open
harendra-kumar opened this issue Aug 16, 2016 · 2 comments
Open

Specifying package versions with --package #2496

harendra-kumar opened this issue Aug 16, 2016 · 2 comments

Comments

@harendra-kumar
Copy link
Collaborator

One can specify package versions in scripts or on command line using the --package command line option e.g. --package turtle-1.2.7. But this impacts the current package database state by installing a package version which is different than the package version in the snapshot without even having that package version specified as an extra-dep in the config. This can break other programs using that package db.

The global db is potentially used by many scripts and if scripts specify there own different versions of packages:

  • it will keep breaking other scripts
  • switching versions between scripts will thrash the package db

What can we do about it?

  • Do not allow versions to be specified. Enforce or update the docs.
  • Issue a warning and ask the user if a script requests a different version and if we use a different version then add it as an extra-dep in stack.yaml so that the package is not silently installed without any knowledge in the config.

This applies to runghc as well as ghc command.

@mgsloan
Copy link
Contributor

mgsloan commented Aug 16, 2016

I think a good way of handling this would be via implicit configurations as described in #1265

@mgsloan mgsloan added this to the P2: Should milestone Aug 16, 2016
@harendra-kumar
Copy link
Collaborator Author

Yeah, ability to handle arbitrary implicit configs is ideal.

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

2 participants