Document additional project config files are read from the root only#11976
Document additional project config files are read from the root only#11976ninioArtillero wants to merge 1 commit into
Conversation
|
Thank you for the PR. Is it ready for review? If so, please add the review-needed label. |
|
@Mikolaj It is ready for review, but I don't have the necessary permissions to add a label. |
|
Oh, yes! Let's remedy that. Please kindly accept an invitations to the cabal of cabal github project contributors. |
|
@philderbeast: you recently overhauled this functionality. Would you mind confirming the docs addition is correct? Anything else we could clarify while we are at it? |
|
@Mikolaj I'm not that familiar with probing up the tree for the project files. I think that stuff was changed in: cabal/release-notes/cabal-install-3.12.1.0.md Lines 25 to 28 in 1c532b0 I am working on #11898 and #11888. This includes getting close to how and when the |
|
I sent an LLM looking for evidence supporting this addition. It pointed at the following places, sharing in case it is of some help to you @philderbeast :
(projectRootDir, projectFile) = case projectRoot of
distProjectFile :: String -> FilePath So distProjectFile "local" = /cabal.project.local, distProjectFile "freeze" = /cabal.project.freeze. All auxiliary files share the same directory as cabal.project. No other locations are checked.
local <- readProjectLocalConfigOrDefault ... -- reads /cabal.project |
This documentation addition reflects my experiments with
3.16.1.0, after struggling with a behavior I did not expected:a
cabal.project.localspecifying local packages I was developing a subproject against stopped being read after acabal.projectfile was added to the top level project root, thus reverting to the store version of the package specified in the subproject cabal file, and resulting in a wild-goose chase after an already fixed bug.Hopefully this addition is enough to avoid this wrong expectation.
Template B: This PR does not modify behaviour or interface
E.g. the PR only touches documentation or tests, does refactorings, etc.
Include the following checklist in your PR: