Giter Site home page Giter Site logo

Comments (6)

talex5 avatar talex5 commented on July 2, 2024

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.

favonia avatar favonia commented on July 2, 2024

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.

avsm avatar avsm commented on July 2, 2024

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.

novemberkilo avatar novemberkilo commented on July 2, 2024

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.

tmcgilchrist avatar tmcgilchrist commented on July 2, 2024

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.

emillon avatar emillon commented on July 2, 2024

I replied over there to clarify the scope of the issue.

from ocaml-ci.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.