Open hasufell opened 2 months ago
The tl;dr is that, as it stands now, they are not part of the project configuration (which is ProjectConfig
).
With respect to store-dir; I had left some comments in the code.
https://github.com/haskell/cabal/blob/2fbfd55bb6e731feeccf22774feec73b3e787302/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L324-L329. One could say it's part of the environment where the project lives more than the project configuration itself. E.g. same ProjectConfig
with two different StoreLayout
s would build "exacty" the same (take this with a grain of salt).
With respect to package-env; this is a flag (cinstEnvironmentPath
) specific to v2-install. I am not sure what meaning it would have inside ProjectConfig
.
AFAIU ProjectConfig
is based on the content of the global configuration (which is indeed parsed into a ProjectConfig
as well). Perhaps there is a distinction between "project configuration" and "local configuration of the build tool" that hasn't been explored.
Can we get a conceptual decision on this, so someone can go ahead and provide a PR?
Will it suffer the same issue that stopped --builddir
from inclusion into project files?
Will it suffer the same issue that stopped
--builddir
from inclusion into project files?
Could you expand why?
Why what? I didn't make any statement, I only asked a question.
i think we should in spirit agree to adding the fields. that said, i think in the resultant sandbox-like workflow they should be added to cabal.project.local since they don’t make sense to check in to source.
also, in my cursory read of the linked ticket, i don't think the same caching considerations should apply here.
Right, I don't see either one affecting caching, so this should be okay modulo their not being part of the things we currently initialize from cabal.project(.local)
.
Gentle bump
I think this is not happening soon because
store-dir
needs to be fixed before the project file is read, and as such may be used during parsing of package
stanzas).There are a couple of other open requests that will require rethinking how and where project files fit into cabal's architecture (e.g. #9230 / #10016 / #10253, which would require some way to put information that currently is associated with *.cabal
files in project files).
I think this is not happening soon because
The main idea of this ticket wasn't to ask cabal devs to do it. But to ask for consensus before a volunteer might work on it, so that no one wastes their time.
Can I assume that there is basic consensus? Ofc an implementation may open further doubts/questions.
There are a couple of other open requests that will require rethinking how and where project files fit into cabal's architecture
This ticket is definitely not about refactoring the current architecture. I want to avoid scope creep.
I think at present store-dir needs to be fixed before the project file is read
@andreabedini do you have further insights into this?
I think @gbaz does. And as @gbaz said, we have agreement in spirit. My worry is that it might be a nightmare to implement in cabal as it currently exists. We keep running into unexpected nasty interactions with things that "ought to be" easy (I think @philderbeast can attest to a few of these?).
Describe the feature request
It seems like an oversight that these aren't supported. I would have expected that
cabal.project
is kind of a superset ofcabal.config
.I don't really see any problems allowing them to be set at the project level. It actually seems kind of intuitive to do so.
Additional context
This is needed to implement a prototype for cabal sandboxes, see: https://github.com/haskell/cabal/issues/10098