cabal icon indicating copy to clipboard operation
cabal copied to clipboard

Wrong condition for passing --working-dir flag

Open Bodigrim opened this issue 1 year ago • 9 comments

https://github.com/haskell/cabal/blob/bccc59f78f64d8db8605380d6735e0730d8bea23/cabal-install/src/Distribution/Client/Setup.hs#L645-L649

#9718 was not backported to 3.12 branch, so the condition should be < 3.13.

CC @sheaf

Bodigrim avatar Apr 26 '24 19:04 Bodigrim

@Bodigrim Is this a symptom of the bug? (trying to build ghc-paths with latest Cabal and GHC, using today's master of cabal-install):

ghc-paths$ cabal-master build -w ghc-9.10.0 -c 'Cabal >= 3.12'

Build profile: -w ghc-9.10.0.20240413 -O1
In order, the following will be built (use -v for more details):
 - ghc-paths-0.1.0.12 (lib:ghc-paths) (cannot read state cache)
unrecognized 'configure' option `--working-dir=/.../ghc-paths/.'
Error: [Cabal-7125]
Failed to build ghc-paths-0.1.0.12. The failure occurred during the configure step.

Update: shows also with older GHCs.

andreasabel avatar Apr 27 '24 18:04 andreasabel

Yes.

Bodigrim avatar Apr 27 '24 18:04 Bodigrim

Thank you for the report. So it seems 3.12.1.0 will not be a cabal-install-only release...

Mikolaj avatar Apr 29 '24 07:04 Mikolaj

Thanks for reporting this issue @Bodigrim. I have put up #9951 with a fix.

sheaf avatar Apr 29 '24 09:04 sheaf

Thank you for the report. So it seems 3.12.1.0 will not be a cabal-install-only release...

The bug is only in cabal-install; fixing this does not by itself necessitate a new Cabal release. (However, I believe there are other reasons we will want a 3.12.1.0 Cabal release.)

sheaf avatar Apr 30 '24 10:04 sheaf

@sheaf points out in https://github.com/haskell/cabal/pull/9951#discussion_r1584968725 that the pre-release cabal-install on the 3.12 branch is unaffected (and so cabal-install 3.12.1.0 won't be), because the functionality can't even be triggered there, because not only the Cabal part, but also the cabal-install part of https://github.com/haskell/cabal/pull/9718 was not backported to 3.12 branch and so --working-dir won't every appear. Do I get it right? Could you kindly confirm that? If so, this is not a regression of 3.12, only of master and, in particular, we don't have to backport.

Mikolaj avatar May 01 '24 08:05 Mikolaj

I retract my previous comment, as it does seem like a master version of cabal-install is required to trigger it.

ulysses4ever avatar May 01 '24 10:05 ulysses4ever

Nobody corrected me, so I will assume this does not affect cabal-install 3.12 and so we don't backport the fix and I can announce a pre-release without pointing this out as a known bug. Shall we close [edit: as soon as the fix lands on master branch in 2 days]?

Mikolaj avatar May 02 '24 09:05 Mikolaj

Nobody corrected me, so I will assume this does not affect cabal-install 3.12 and so we don't backport the fix and I can announce a pre-release without pointing this out as a known bug. Shall we close [edit: as soon as the fix lands on master branch in 2 days]?

Yes, I believe no backport is needed and we just need to merge the fix to master.

sheaf avatar May 02 '24 09:05 sheaf