Skip to content
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

Wrong condition for passing --working-dir flag #9940

Closed
Bodigrim opened this issue Apr 26, 2024 · 9 comments · Fixed by #9951
Closed

Wrong condition for passing --working-dir flag #9940

Bodigrim opened this issue Apr 26, 2024 · 9 comments · Fixed by #9951
Assignees
Labels
regression on master Regression that is unreleased and needs to be fixed before release type: bug

Comments

@Bodigrim
Copy link
Collaborator

flags_3_11_0 =
flags_latest
{ setupWorkingDir = NoFlag
}
-- Cabal < 3.11 does not support the --working-dir flag.

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

CC @sheaf

@andreasabel
Copy link
Member

andreasabel commented Apr 27, 2024

@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.

@Bodigrim
Copy link
Collaborator Author

Yes.

@Mikolaj
Copy link
Member

Mikolaj commented Apr 29, 2024

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

@sheaf sheaf self-assigned this Apr 29, 2024
sheaf added a commit that referenced this issue Apr 29, 2024
The --working-dir flag is only available for Cabal >= 3.13.
This commit fixes an incorrect conditional: we only filtered out this
flag for Cabal < 3.11, instead of < 3.13.

Fixes #9940
@sheaf
Copy link
Collaborator

sheaf commented Apr 29, 2024

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

@sheaf
Copy link
Collaborator

sheaf commented Apr 30, 2024

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 added a commit that referenced this issue Apr 30, 2024
The --working-dir flag is only available for Cabal >= 3.13.
This commit fixes an incorrect conditional: we only filtered out this
flag for Cabal < 3.11, instead of < 3.13.

Test: PackageTests/WorkingDir

Fixes #9940
sheaf added a commit that referenced this issue Apr 30, 2024
The --working-dir flag is only available for Cabal >= 3.13.
This commit fixes an incorrect conditional: we only filtered out this
flag for Cabal < 3.11, instead of < 3.13.

Test: PackageTests/WorkingDir

Fixes #9940
sheaf added a commit that referenced this issue Apr 30, 2024
The --working-dir flag is only available for Cabal >= 3.13.
This commit fixes an incorrect conditional: we only filtered out this
flag for Cabal < 3.11, instead of < 3.13.

Test: PackageTests/WorkingDir

Fixes #9940
@Mikolaj
Copy link
Member

Mikolaj commented May 1, 2024

@sheaf points out in #9951 (comment) 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 #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.

@ulysses4ever
Copy link
Collaborator

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

@Mikolaj
Copy link
Member

Mikolaj commented May 2, 2024

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]?

@sheaf
Copy link
Collaborator

sheaf commented May 2, 2024

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.

Mikolaj pushed a commit that referenced this issue May 2, 2024
The --working-dir flag is only available for Cabal >= 3.13.
This commit fixes an incorrect conditional: we only filtered out this
flag for Cabal < 3.11, instead of < 3.13.

Test: PackageTests/WorkingDir

Fixes #9940
@mergify mergify bot closed this as completed in #9951 May 2, 2024
sheaf added a commit to mpickering/cabal that referenced this issue May 3, 2024
The --working-dir flag is only available for Cabal >= 3.13.
This commit fixes an incorrect conditional: we only filtered out this
flag for Cabal < 3.11, instead of < 3.13.

Test: PackageTests/WorkingDir

Fixes haskell#9940
mergify bot pushed a commit that referenced this issue May 29, 2024
* CI: add GHC 9.10

* GHC 9.10 compat in testsuite: CPP symbols don't get passed to CC as
eagearly

Discussion: #9914 (comment)

Related GHC issue: https://gitlab.haskell.org/ghc/ghc/-/issues/21291

* GHC 9.10 compat in tests: disable tests regressing due to #9940
mergify bot pushed a commit that referenced this issue May 29, 2024
* CI: add GHC 9.10

* GHC 9.10 compat in testsuite: CPP symbols don't get passed to CC as
eagearly

Discussion: #9914 (comment)

Related GHC issue: https://gitlab.haskell.org/ghc/ghc/-/issues/21291

* GHC 9.10 compat in tests: disable tests regressing due to #9940

(cherry picked from commit 3a8c69c)
ulysses4ever added a commit that referenced this issue May 30, 2024
* CI: add GHC 9.10

* GHC 9.10 compat in testsuite: CPP symbols don't get passed to CC as
eagearly

Discussion: #9914 (comment)

Related GHC issue: https://gitlab.haskell.org/ghc/ghc/-/issues/21291

* GHC 9.10 compat in tests: disable tests regressing due to #9940

(cherry picked from commit 3a8c69c)
ulysses4ever added a commit that referenced this issue Jun 3, 2024
* CI: add GHC 9.10

* GHC 9.10 compat in testsuite: CPP symbols don't get passed to CC as
eagearly

Discussion: #9914 (comment)

Related GHC issue: https://gitlab.haskell.org/ghc/ghc/-/issues/21291

* GHC 9.10 compat in tests: disable tests regressing due to #9940

(cherry picked from commit 3a8c69c)
mergify bot added a commit that referenced this issue Jun 3, 2024
* CI: add GHC 9.10

* GHC 9.10 compat in testsuite: CPP symbols don't get passed to CC as
eagearly

Discussion: #9914 (comment)

Related GHC issue: https://gitlab.haskell.org/ghc/ghc/-/issues/21291

* GHC 9.10 compat in tests: disable tests regressing due to #9940

(cherry picked from commit 3a8c69c)

Co-authored-by: Artem Pelenitsyn <a.pelenitsyn@gmail.com>
mmhat pushed a commit to mmhat/cabal that referenced this issue Jun 24, 2024
* CI: add GHC 9.10

* GHC 9.10 compat in testsuite: CPP symbols don't get passed to CC as
eagearly

Discussion: haskell#9914 (comment)

Related GHC issue: https://gitlab.haskell.org/ghc/ghc/-/issues/21291

* GHC 9.10 compat in tests: disable tests regressing due to haskell#9940
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression on master Regression that is unreleased and needs to be fixed before release type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants