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 --offline flag (backport #8676) #8838

Closed
wants to merge 1 commit into from
Closed

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Mar 9, 2023

This is an automatic backport of pull request #8676 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

* WIP

* WIP

* WIP

* WIP

* WIP

* add offline logic branch

* Clean up

* Formatting

* Optimize

* Rename test folder

* Add changelog file

* Fix whitespace

* Add <CABAL_ERROR> normalizer tag

* code review changes

* Delet vs code file

* Fix import

* fix wrong output file

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 0ed1218)
@mergify mergify bot mentioned this pull request Mar 9, 2023
3 tasks
@mergify mergify bot added the backport label Mar 9, 2023
@@ -559,6 +562,7 @@ invalidatePackageRegFileMonitor PackageFileMonitor{pkgFileMonitorReg} =
-- It requires the 'BuildStatusMap' gathered by 'rebuildTargetsDryRun'.
--
rebuildTargets :: Verbosity
-> ProjectConfig
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -192,6 +192,7 @@ instance Exception BuildFailure
-- | Detail on the reason that a package failed to build.
--
data BuildFailureReason = DependentFailed PackageId
| GracefulFailure String
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andreabedini
Copy link
Collaborator

andreabedini commented Mar 9, 2023

I am confused, is this a backport ... into 3.10? In that case, apologies, and please ignore my comments 🙃

@ulysses4ever
Copy link
Collaborator

@andreabedini good point about breaking changes. Initially I treated this as a bug fix, but your observation means we can't release it in 3.10.2, so i guess we should close it?

@Mikolaj
Copy link
Member

Mikolaj commented Mar 10, 2023

I remember a discussion that cabal-install and cabal-install-solver are implicitly under .Internal., but did we note down this contract with the library user somewhere?

@Kleidukos
Copy link
Member

If nobody in the user base is aware of such a contract it's not going to go very far indeed

1 similar comment
@Kleidukos
Copy link
Member

If nobody in the user base is aware of such a contract it's not going to go very far indeed

@andreabedini
Copy link
Collaborator

andreabedini commented Mar 13, 2023

Yeah so 3.10.1.0 has been released with BuildFailureReason

data BuildReason =
     BuildReasonDepsRebuilt
   | BuildReasonFilesChanged (MonitorChangedReason ())
   | BuildReasonExtraTargets (Set ComponentName)
   | BuildReasonEphemeralTargets

We cannot add a new constructor to it without a major version bump (i.e. 3.11). Same applied to rebuildTargets. I have been writing few tools that interact with cabal-install library so I'd appreciate if PVP was followed :)

I remember a discussion that cabal-install and cabal-install-solver are implicitly under .Internal., but did we note down this contract with the library user somewhere?

What would be the rationale for this?

@ulysses4ever
Copy link
Collaborator

@andreabedini I'm totally on board with not backporting, and again thank you for catching it. Mikolaj should do the final call though.

@Mikolaj
Copy link
Member

Mikolaj commented Mar 13, 2023

I must have hallucinated the .Internal. contract, then. Let's punt until 3.12 or until we have a very good reason to spend effort on advertising this break to PvP and asking cabal-install library users if they'd be affected. Thank you for the alert and for the discussion. Closing.

@Mikolaj Mikolaj closed this Mar 13, 2023
@mergify mergify bot deleted the mergify/bp/3.10/pr-8676 branch March 13, 2023 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants