Giter Site home page Giter Site logo

Support pin-depends about ocaml-ci HOT 10 CLOSED

ocurrent avatar ocurrent commented on August 22, 2024
Support pin-depends

from ocaml-ci.

Comments (10)

Julow avatar Julow commented on August 22, 2024 1

We tried to study a simple/naive fix yesterday:
We could use git ls-remote to query the last rev of each pin-depends (in a job placed outside of Analyse's cache). The rev could then be inserted in the command installing them, invalidating Docker's cache if that changes.
The problem is that opam files and opam show are very hard to parse. To solve that we should use Opam's opam-format library.

from ocaml-ci.

talex5 avatar talex5 commented on August 22, 2024

Note: another way to depend on dev versions is to use git submodule to add the exact commit you want to your project. ocaml-ci will automatically fetch these submodules (using git clone --recursive) and dune will automatically build against them.

from ocaml-ci.

pascutto avatar pascutto commented on August 22, 2024

Note: another way to depend on dev versions is to use git submodule to add the exact commit you want to your project. ocaml-ci will automatically fetch these submodules (using git clone --recursive) and dune will automatically build against them.

If we wanted to depend on a specific commit we could also pin-depend on that specific commit, and the CI works well in that case too.

from ocaml-ci.

talex5 avatar talex5 commented on August 22, 2024

Note that pin-depends is broken at the moment as the new solver (in #167) only has access to the Git clone and opam-repository. I guess we'll need to implement fetching of pin-depends manually somehow.

from ocaml-ci.

craigfe avatar craigfe commented on August 22, 2024

Title changed to reflect that this is now a more general issue.

from ocaml-ci.

talex5 avatar talex5 commented on August 22, 2024

pin-depends with a commit hash is working again now. I don't think we'll support pinning to branches any time soon.

from ocaml-ci.

pascutto avatar pascutto commented on August 22, 2024

It seems like there is an issue when pinning to a repo where the opam file is not at the root (maybe it's unrelated to pinning?), it can't find the opam file thus fails during analysis.

from ocaml-ci.

talex5 avatar talex5 commented on August 22, 2024

Do you have a link to an example? ocaml-ci currently assumes the opam file is at /$name.opam, although I think opam also allows some other forms.

from ocaml-ci.

pascutto avatar pascutto commented on August 22, 2024

Here's one: https://ci.ocamllabs.io/github/vocal-project/vocal/commit/363a91d49e1e89c202d5656c088f3a8ca538f68c/variant/(analysis)
The opam file is under a opam/ folder

from ocaml-ci.

talex5 avatar talex5 commented on August 22, 2024

I've pushed a fix - should be working now!

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.