Reputation: 1401
I'm using the stack install
command to save dependencies for a new project. How do I get it to save those dependencies into stack.yaml
? Unless I'm missing something, I can't see where stack is recording the project dependencies and I can't seem to find anything in a docs about this.
Upvotes: 0
Views: 378
Reputation: 36385
You still keep your dependencies in a .cabal
file. From the Stack FAQ:
- A .cabal file is provided for each package, and defines all package-level metadata just like it does in the cabal-install world: modules, executables, test suites, etc. No change at all on this front.
- A stack.yaml file references 1 or more packages, and provides information on where dependencies come from.
If you need additional versions of dependencies than the LTS Haskell snapshot you're using, you'll add them to the extra-deps
portion of the stack.yaml file.
Upvotes: 4