Giter Site home page Giter Site logo

Comments (6)

talex5 avatar talex5 commented on July 21, 2024 1

This will be fixed as a side-effect of #285.

from ocaml-ci.

avsm avatar avsm commented on July 21, 2024

Yes, this sounds like a good thing to add. I think a general 'lint promote' step to check that no promotions occur would be useful. This has to also do a git diff, since opam file generation is a special case that is not a dune promote candidate.

from ocaml-ci.

avsm avatar avsm commented on July 21, 2024

We don't have a git checkout, so it's not quite as simple as git --exit-code to implement this.

One cheap and cheerful way would be to chmod the source directory to be read-only. It looks like BuildKit got support for this 24 days ago, so need to check if it's made its way into a docker release near us first... moby/buildkit#1492

from ocaml-ci.

hannesm avatar hannesm commented on July 21, 2024

We don't have a git checkout

I've no clue about the internals, but my intuition is that ocaml-ci/ocurrent uses a git clone of a remote repository for conducting its work. Now, if you don't have a git checkout, I fail to understand how ocaml-ci is supposed to work. You could copy the directory before build and do a recursive diff after build.

from ocaml-ci.

avsm avatar avsm commented on July 21, 2024

ocaml-ci builds a Dockerfile that's incremental, so it copies in the source tree as it builds up layers. For example it starts with the opam files, analyses metadata, installs depexts, then adds the sources, then does a dune build. This way if you just modify OCaml code, the depext phase and earlier can be cached since they will not have changed.

It therefore never has a full git checkout in the Dockerfile. I ran a quick test and chmod -R 400 of the source tree works fine. You get a permission denied error when dune tries to modify the source tree -- the only time it does this is to write a .merlin file or to update opam files, so it should be safe for the CI to do and won't disturb caching.

from ocaml-ci.

craigfe avatar craigfe commented on July 21, 2024

Looks like this one can be closed thanks to opam-dune-lint :-)

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.