-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well spotted. LGTM.
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
establishDummyProjectBaseContext
uses in the codebase (CmdInstall
,CmdRepl
andCmdRun
) are guarded byProjectOrchestation.withProjectOrGlobalConfig
and it is already adding the global configrunInstall
with a project it is included tooProjectOrchestation.establishDummyProjectBaseContext
cliConfig
toprojectConfig
to 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
knowBroken
in 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