Reputation: 1047
There are current two projects with stack and cabal files each (I use stack to build), one is an exe called test and the other is a library called testlib. I want to use testlib in the test project, what can I do to let stack know testlib is a custom library and how to find it?
-- projects/test/test.yaml
-- projects/testlib/testlib.yaml
Upvotes: 3
Views: 319
Reputation: 17796
You can use extra-deps
or packages
according to taste. packages
should be used when the extra library (testlib
in your example) is part of your development work, and extra-deps
when you have a stable release.
The manual has more details.
Upvotes: 2
Reputation: 1047
I find the answer.
extra-deps solve the problem.
And the test.yaml seems like:
...
extra_deps:
- ../testlib-1.0.0
...
Two points should be noticed:
Any better solution will be welcome. And thanks a lot for the help!
Upvotes: 6