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

Add validate-revision workflow #9561

Merged
merged 1 commit into from
Jan 9, 2024
Merged

Conversation

ulysses4ever
Copy link
Collaborator

The GitHub workflo defined here can be started manually to check that certain version bumps build fine. It will ask to input an allow-newer line and a constraint line, which it will add to the cabal.project file. For example: the "filepath" allow-newer line and "filepath == 1.5" constraints line will make sure that the build plan will have filepath at version 1.5.

Unfortunately, it's almost an exact copy of validate.yml and has to be maintained in concert with it.

/cc @Mikolaj who pushed the revisions policy, see #9531 (comment)


Template Β: This PR does not modify cabal behaviour (documentation, tests, refactoring, etc.)

Include the following checklist in your PR:

Comment on lines 3 to 4
# It's almost exact copy of validate.yml and has to be maintainted in concert with it.
# The difference is in the `on` attribute and the step where we do >> cabal.project.validate
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we then have an “☞ N.B. If you modify this, incorporate the same modifications in validate-revision.yml!” in validate.yml?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, good point. I'm thinking now if there may be a way to reuse the existing workflow, so that we avoid duplication altogether. I'll keep you posted!

@ulysses4ever
Copy link
Collaborator Author

I should have mentioned: I tried it on my own fork, and it works as expected: https://github.com/ulysses4ever/cabal/actions/workflows/validate-revision.yml But I really don't like the duplication and looking into it...

@Kleidukos
Copy link
Member

@ulysses4ever Looks to me like you found something appropriate to avoid duplication!

@ulysses4ever
Copy link
Collaborator Author

@Kleidukos i haven’t found a way to properly plumb it together yet.

@Mikolaj
Copy link
Member

Mikolaj commented Dec 27, 2023

Regardless of the duplication, great job! Let's make sure to document it properly in many places, so that it gets used.

@ulysses4ever
Copy link
Collaborator Author

Dear all, I revamped the initial submission to:

  • avoid duplication of validate.yml, and
  • add documentation to CONTRIBUTING.md, as suggested by @Mikolaj

Please double-check.

It's impossible to test it before merging per se, but I checked that it seems to be doing the right thing on my fork. Here's a run for tar ==0.6.0.0, for example. It fails in the build stage as expected. And this line there shows that tar 0.6.0.0 is picked up.

@ulysses4ever ulysses4ever added the merge me Tell Mergify Bot to merge label Jan 7, 2024
@mergify mergify bot added the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label Jan 9, 2024
It can be started manually to check that certain version bumps build fine.
It will ask to input an allow-newer line and a constraint line, which it
will add to the cabal.project file. For example: the "filepath"
allow-newer line and "filepath == 1.5" constraints line will make sure
that the build plan will have `filepath` at version 1.5.
@mergify mergify bot merged commit 8121357 into haskell:master Jan 9, 2024
18 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge me Tell Mergify Bot to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants