commercialhaskell / commercialhaskell/stack
Specifying package versions with --package
- Dominant language
- Haskell
- Stars
- 4.1k
- Forks
- 850
- Avg merge
- 10h 37m
- Merged PRs (30d)
- 4
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.