[ANN] Set up OCaml - Analysis

I think it has been a really long time since I have posted anything here. To be honest, I’ve been a bit busy and quite lazy.

For over a year now, I’ve been trying to add support for declaring opam packages to GitHub using the dependency submission API.

Initially this was not very practical, as it required actually installing the opam package. And even getting a full list of dependencies was difficult.
However, after some collaborative work between myself and a friend to implement some functionalities on the opam side, and finally to make it work better with opam, it’s finally ready to be widely tested.

We don’t even have to “actually” install the dependencies anymore! (No need to wait several minutes just for analysis!)

There is no support for opam on the GitHub side yet, but I hope that widespread community use will encourage GitHub to support opam.

I want some people to try out this before we merge it. Can anyone help me with this?

To try it out, install the pre-release opam as follows and use the analysis action explicitly.

name: OCaml Dependency Submission

on:
  push:
    branches:
      - main

jobs:
  ocaml-dependency-submission:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout tree
        uses: actions/checkout@v4

      - name: Set-up OCaml
        uses: ocaml/setup-ocaml@v2
        with:
          ocaml-compiler: "5.0"
          allow-prelease-opam: true

      - name: OCaml dependency submission
        uses: ocaml/setup-ocaml/analysis@analysis
12 Likes

Just my two cents: I think github things are very brittle.
And, the day they decide to change their API or drop a feature, this thing might not work anymore…

1 Like

I’m not the one to advise/help with github stuffs, but opam tree looks great, thanks for that. :smile:

2 Likes

Just tried opam tree - it’s really nice! Are there any plans to include more information into opam tree output like licenses, package urls, checksums? That would greatly help with SBOM generation for OPAM…