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

Fix ./setup install comand (backport #10417) #10436

Closed
wants to merge 1 commit into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Oct 8, 2024

Running ./setup install will give you an error:

fromFlag NoFlag. Use fromFlagOrDefault
CallStack (from HasCallStack):
  error, called at src/Distribution/Simple/Flag.hs:110:19 in Cabal-3.15.0.0-inplace:Distribution.Simple.Flag
  fromFlag, called at src/Distribution/Simple/Register.hs:161:16 in Cabal-3.15.0.0-inplace:Distribution.Simple.Register

This seems to not be tested anywhere and most people will use ./setup register in any case, but we should fix this for the next point release in 3.14 series. # Please enter the commit message for your changes. Lines starting

Fixes #10416

Please read Github PR Conventions and then fill in one of these two templates.


Template Α: This PR modifies behaviour or interface

Include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.
  • Manual QA notes have been included.
  • Tests have been added. (Ask for help if you don’t know how to write them! Ask for an exemption if tests are too complex for too little coverage!)

Template B: This PR does not modify behaviour or interface

E.g. the PR only touches documentation or tests, does refactorings, etc.

Include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

This is an automatic backport of pull request #10417 done by [Mergify](https://mergify.com).

@mergify mergify bot added the conflicts label Oct 8, 2024
Copy link
Contributor Author

mergify bot commented Oct 8, 2024

Cherry-pick of 2a178f2 has failed:

On branch mergify/bp/3.12/pr-10417
Your branch is up to date with 'origin/3.12'.

You are currently cherry-picking commit 2a178f243.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   cabal-testsuite/PackageTests/Install/DistPrefInstall/CHANGELOG.md
	new file:   cabal-testsuite/PackageTests/Install/DistPrefInstall/DistPrefInstall.cabal
	new file:   cabal-testsuite/PackageTests/Install/DistPrefInstall/Setup.hs
	new file:   cabal-testsuite/PackageTests/Install/DistPrefInstall/setup.test.hs
	new file:   cabal-testsuite/PackageTests/Install/DistPrefInstall/src/MyLib.hs
	new file:   changelog.d/t10416

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   Cabal/src/Distribution/Simple.hs

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot mentioned this pull request Oct 8, 2024
7 tasks
@mergify mergify bot added the backport label Oct 8, 2024
Running ./setup install will give you an error:

```
fromFlag NoFlag. Use fromFlagOrDefault
CallStack (from HasCallStack):
  error, called at src/Distribution/Simple/Flag.hs:110:19 in Cabal-3.15.0.0-inplace:Distribution.Simple.Flag
  fromFlag, called at src/Distribution/Simple/Register.hs:161:16 in Cabal-3.15.0.0-inplace:Distribution.Simple.Register
```

This seems to not be tested anywhere and most people will use ./setup
register in any case, but we should fix this for the next point release
in 3.14 series. # Please enter the commit message for your changes.
Lines starting

Fixes #10416

(cherry picked from commit 2a178f2)

# Conflicts:
#	Cabal/src/Distribution/Simple.hs
@geekosaur
Copy link
Collaborator

geekosaur commented Oct 8, 2024

This can't be be backported to 3.12; it depends on SetupHooks which is 3.13+. Since it's a relatively small change that seems to be involved here, I'm poking at whether it can be rephrased not to require that, but I'm not hopeful.

@geekosaur
Copy link
Collaborator

Sadly, it's one line that's key to the whole thing and requires something not present in 3.12. CLosing.

@geekosaur geekosaur closed this Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants