Repository navigation
Avoid using duplicate global config not adding it in the dummy project context - #7753
Conversation
|
The pr still misses the repl and run actions in a project context cases |
It is already covered indeed cause |
1b51846 to
1d5f322
Compare
|
Trying to discover tests, i did not find:
So one path of action i can think of could be add the output of |
|
Yes, the test suite has surprising gaps, in particular, not testing some of its own machinery. ;) |
|
I'm confused by the title of this PR. I thought the "final" project context should be:
Is that what your PR enforces? If not, I'd love to see an explanation. |
|
well the problem is the global config was being added twice, hence the duplication of some config options will try to rephrase the title to make it clearer |
Regression tests added in #7759, will rebase this after being merged |
|
Demoting to draft until #7759 is merged in master |
|
@Mergifyio rebase master |
* Afaics all establishDummyProjectBaseContext uses in the codebase (CmdInstall, CmdRepl and CmdRun) are guarded by ProjectOrchestation.withProjectOrGlobalConfig and it is already adding the global config * Changed the argament name from cliConfig to projectConfig to make clear it includes the config from more sources than the cli. * Added an argument comment to make clear client code *must* include the global config if it is needed
b3ebb00 to
c2c394b
Compare
✅ Branch has been successfully rebased |
|
test has failed successfully |
|
ci has failed quite misteriously: 🤔 |
Not sure what that means. |
|
Perhaps |
|
Tests has worked locally with b1f7bbe, adding cabal/cabal-testsuite/src/Test/Cabal/Prelude.hs Lines 684 to 687 in 980a532 I am still gazing at the code trying to understand why |
|
Great! So, this one is merged. Could you tell me when can I expect to see it in a released |
Hopefully fixes Using cabal install in a project or install/repl without a project, duplicates global config and rebuilds libs twice in the store #6906 following @phadej and @gbaz suggestions
Afaics all
establishDummyProjectBaseContextuses in the codebase (CmdInstall,CmdReplandCmdRun) are guarded byProjectOrchestation.withProjectOrGlobalConfigand it is already adding the global configrunInstallwith a project it is included tooProjectOrchestation.establishDummyProjectBaseContextcliConfigtoprojectConfigto make clear it includes the config from more sources than the cli.Patches conform to the coding conventions.
Any changes that could be relevant to users have been recorded in the changelog.
Rebase this onto Log package hash inputs file and contents / regression test for #6906 #7759, unmarking
knowBrokenin the regression tests added thereTests:
From a functional pov afaik the unique observable change is the bad input in hash.txt.. Not sure if it is already being examined in other tests
Would love to have some help about how and where to add unit tests