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

OCamlformat version makes the analysis fail #834

Closed
Julow opened this issue Jun 28, 2023 · 10 comments
Closed

OCamlformat version makes the analysis fail #834

Julow opened this issue Jun 28, 2023 · 10 comments
Assignees
Labels
type/bug Something isn't working

Comments

@Julow
Copy link
Contributor

Julow commented Jun 28, 2023

Context

I opened PRs with the next unreleased version of OCamlformat applied. The version field in .ocamlformat contains an invalid value.

Step(s) to reproduce

echo "version = 0.99.0" > .ocamlformat

Expected behaviour

The version of OCamlformat seems to be resolved for every compilers and every compilers fail to resolve due to that.

I would expect:

  • OCamlformat is only resolved for the "fmt" job.
  • If the "fmt" job fails to be resolved, other jobs are not interrupted and the CI run with an always failing "fmt" job.

Additional context

For example, in Odoc on this PR: ocaml/odoc#979
CI result: https://ocaml.ci.dev/github/ocaml/odoc/commit/f42fd067a329da36ef64f1f2cdac75967da60885/variant/%28analysis%29

@moyodiallo
Copy link
Contributor

moyodiallo commented Sep 5, 2023

I'm trying to reproduce the bug, I set ocamlformat version to "0.99.0" And I got this https://ocaml.ci.dev/github/moyodiallo/odoc/commit/28c31b974605701babfd0c645d0b8de5c68d6591
2023-09-05 17:18.58: Job failed: No solution found for any supported platform.

Would you like to validate it ? Or did something change ? @Julow

@Julow
Copy link
Contributor Author

Julow commented Sep 5, 2023

This reproduces the problem: The (analysis) job fails due to ocamlformat and no other job run.

@moyodiallo
Copy link
Contributor

The fix for this issue is deployed, would you like to validate the result observed here https://ocaml.ci.dev/github/moyodiallo/odoc/commit/28c31b974605701babfd0c645d0b8de5c68d6591 (same link as above).
@Julow

@Julow
Copy link
Contributor Author

Julow commented Sep 7, 2023

That fixes my issue, thanks :)

Though the error message isn't nice:

Error: Program ocamlformat not found in the tree or in PATH

The job might as well fail immediately with a clearer message.

@moyodiallo
Copy link
Contributor

The job might as well fail immediately with a clearer message.

You're right, verifying if the ocamlformat version is available from the analysis result.

tmcgilchrist added a commit that referenced this issue Sep 12, 2023
Fix the analysis with unrelease ocamlformat version (#834)
@benmandrew
Copy link
Contributor

benmandrew commented Sep 19, 2023

Is this fixed by #865 @moyodiallo?

Yes, what is left is to remove fmt jobs just have it clean.

moyodiallo added a commit to moyodiallo/ocaml-ci that referenced this issue Sep 20, 2023
This is the fix of ocurrent#834, which was partially fixed on ocurrent#865
@moyodiallo
Copy link
Contributor

After the merge of #877, we can close this.

moyodiallo added a commit that referenced this issue Sep 20, 2023
This is the fix of #834, which was partially fixed on #865
@gpetiot
Copy link
Contributor

gpetiot commented Oct 10, 2023

We still observe this on ocamlformat's repository: https://github.com/ocaml-ppx/ocamlformat/runs/17517278251

(we don't have a set version in the .ocamlformat file because we use the version of the same commit to format ocamlformat's codebase)

@benmandrew benmandrew reopened this Oct 10, 2023
@moyodiallo
Copy link
Contributor

Keep in mind those 2 issues are different. what you're describing is ocamlformat without version. I think It could be preferable to open another issue.

@benmandrew
Copy link
Contributor

@moyodiallo you're right, I've opened another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants