Repository navigation
Remove local options from global program options - #7973
Conversation
|
This is amazing! However, people have already got used to the wrong behaviour, so let's make sure we change it once and don't ask them to re-adjust repeatedly. Is the desired semantics completely clear or do we need to ask users, discuss again on the tickets you mentioned, etc.? |
|
It is somewhat weird this did not break any test. I think we should add some sort of regression test to exercise the change and have evidences it fixes those issues |
well, as noted in the pr description
so it is not so weird there are no tests checking ghc-options are applied to non local packages Probably this will break quite use cases, it is worth to note you can recover the old behaviour with if you have a local project. Not sure if there would be a easy one for installing from a tarball or hackage though |
4038fd8 to
e530351
Compare
|
Tests added to demonstrate old behavior/verify fix. Before the fix, tests failed with: Here I need to double check, but I believe command-line options are also passed into the "local" portion of the project config, which means this would also affect that. I think command line only affecting local packages is the intended behavior, but as you mentioned it might break some use cases. To recreate old behavior, this still works: |
e530351 to
98ece87
Compare
98ece87 to
ab0c9c6
Compare
Mikolaj
left a comment
There was a problem hiding this comment.
Good job. Let me try to merge this.
|
@Mergifyio rebase |
☑️ Nothing to doDetails
|
Simplifies *.project.* files a bit. It wasn't feasible before #7973, as program-options were applied to dependencies as well, which is undesirable.
Simplifies *.project.* files a bit. It wasn't feasible before #7973, as program-options were applied to dependencies as well, which is undesirable.
Simplifies *.project.* files a bit. It wasn't feasible before #7973, as program-options were applied to dependencies as well, which is undesirable.
Simplifies *.project.* files a bit. It wasn't feasible before #7973, as program-options were applied to dependencies as well, which is undesirable.
Simplifies *.project.* files a bit. It wasn't feasible before #7973, as program-options were applied to dependencies as well, which is undesirable.
Simplifies *.project.* files a bit. It wasn't feasible before #7973, as program-options were applied to dependencies as well, which is undesirable.
Simplifies *.project.* files a bit. It wasn't feasible before #7973, as program-options were applied to dependencies as well, which is undesirable.
Simplifies *.project.* files a bit. It wasn't feasible before #7973, as program-options were applied to dependencies as well, which is undesirable.
Simplifies *.project.* files a bit. It wasn't feasible before haskell#7973, as program-options were applied to dependencies as well, which is undesirable.
Please include the following checklist in your PR:
Please also shortly describe how you tested your change. Bonus points for added tests!
Local options for compiler related flags are 1) applied to all packages and 2) cached. Both of which seem incorrect.
This PR removes those options from the pre-configured program DB. Note that options are still applied correctly here:
cabal/cabal-install/src/Distribution/Client/ProjectPlanning.hs
Line 1914 in 7d66cea
There are lots of related issues around weird behavior trying to apply ghc-options:
--ghc-optionsare cached, but shouldn't be #7816This PR makes this
cabal.projectstanza work as intended, applying theghc-optionsto all/only local packages:and removes the need for this workaround: