You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is both a specific question and a broader goal, so to avoid an XY problem I'll explain both.
I have an open source program built with Stack in a public repo. I also have a closed source library in a private repo. The open source program can optionally use the closed source library. I want to make it easy to build both with and without it.
My idea is to use a flag in the program's .cabal file:
flag UseClosedLib
default: False
description: Use optional extra library
executable myprog
if flag(UseClosedLib)
build-depends: closed-lib
cpp-options: -DUSECLOSEDLIB
Then, since I have both repos on my local system, I'd like to just configure my global Stack settings to know where closed-lib is located:
This is because, ideally, I want the program's repo to be in a state to build without the add-on by default, and I don't want to have to keep the stack.yaml in a modified state in my local copy of the public repo.
But, as per the Stack documentation, it's not possible to specify project-specific options such as extra dependencies in the global Stack config. Is there another way I can do this? Or, do you have a better idea for how I can set this up?
The text was updated successfully, but these errors were encountered:
This is both a specific question and a broader goal, so to avoid an XY problem I'll explain both.
I have an open source program built with Stack in a public repo. I also have a closed source library in a private repo. The open source program can optionally use the closed source library. I want to make it easy to build both with and without it.
My idea is to use a flag in the program's
.cabal
file:Then, since I have both repos on my local system, I'd like to just configure my global Stack settings to know where
closed-lib
is located:This is because, ideally, I want the program's repo to be in a state to build without the add-on by default, and I don't want to have to keep the
stack.yaml
in a modified state in my local copy of the public repo.But, as per the Stack documentation, it's not possible to specify project-specific options such as extra dependencies in the global Stack config. Is there another way I can do this? Or, do you have a better idea for how I can set this up?
The text was updated successfully, but these errors were encountered: