Comments (6)
I asked @craigfe about this recently, and he said it was to do with wanting to lint dune files even in projects without ocamlformat. The dune docs say:
By default, formatting will be enabled for all languages and dialects present in the project that dune knows about.
Which seems a bit odd, as new ones might get added without you doing anything. I guess people should use (formatting disabled)
if they don't want formatting, or enabled_for
and list the formatters they want:
https://dune.readthedocs.io/en/latest/dune-files.html#formatting
from ocaml-ci.
Yeah, I added (formatting disabled)
after studying why my package (originally) did not pass CI. How about an error message like this? I can imagine that a beginner would be confused (after ocaml-ci goes more public).
dune build @fmt failed.
It is likely that dune could not find the binary executable ocamlformat in the current environment.
Possible solutions: specify the version of OCamlFormat in .ocamlformat so that ocaml-ci will install it,
or disable formatting in dune-project. See https://dune.readthedocs.io/en/latest/dune-files.html#formatting.
Perhaps some analysis of the actual errors (before printing out the above message) would also help.
from ocaml-ci.
I think this is a bug in dune -- a newer version of the dune client should not break older workflows without a versioning step involved. We shouldn't be working around this with complex logic in ocaml-ci, as other CIs will eventually hit it then. I've filed ocaml/dune#3642 for downstream discussion.
from ocaml-ci.
Visiting this as part of a general cleanup -
@emillon can I please check in on the status of the linked dune issue.
Possibly related: At the moment a missing version
in .ocamlformat
causes the analysis step to fail when it should probably handle it gracefully and continue to build the project while failing the linting step.
Anything that you'd like to add to help decide what action we could take on this issue please @avsm @talex5 @favonia? Thanks //cc @tmcgilchrist
from ocaml-ci.
Possibly related: At the moment a missing version in .ocamlformat causes the analysis step to fail when it should probably handle it gracefully and continue to build the project while failing the linting step.
We should handle that gracefully, also reported via #834. Pinged the linked issue on dune which has been inactive since 2020.
from ocaml-ci.
I replied over there to clarify the scope of the issue.
from ocaml-ci.
Related Issues (20)
- customized compiler distro? HOT 5
- lint-fmt fails on package using dune's "site" feature HOT 2
- `lint-doc` uses lower-bounds for installing dependencies HOT 1
- CI failure HOT 3
- UX HOT 5
- SLA / service outage HOT 5
- EXPERIMENTAL: (lint-opam) (failure: No *.opam files found!)
- Web UI reports "Oops! Internal Server Error" when job hasn't started yet
- Missing `.ocamlformat` version line causes analysis failure HOT 1
- failed: Failed to get head of ocaml/opam-repository:refs/heads/master HOT 1
- CI failure on 5.1 32-bit builders HOT 1
- OCaml 5.2 support HOT 2
- Add additional opam-repository / Dockerfile customization? HOT 3
- Naming of builders
- FreeBSD CI failures HOT 8
- debian-12 x86_32 workers fail due to old capnproto version HOT 5
- `lint-doc` job failing on installation of `conf-git` HOT 1
- `lint-fmt` job fails with "Error: Program ocamlformat not found in the tree or in PATH" HOT 3
- Web UI doesn't show log output, but CLI does
- `lint-fmt` failing with file permission error HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ocaml-ci.