Skip to content

Unify metadata files back into one - #203

Merged
Leonidas-from-XIV merged 1 commit into
ocaml-dune:mainfrom
Leonidas-from-XIV:unify-metadata-again
Feb 23, 2026
Merged

Unify metadata files back into one#203
Leonidas-from-XIV merged 1 commit into
ocaml-dune:mainfrom
Leonidas-from-XIV:unify-metadata-again

Conversation

@Leonidas-from-XIV

Copy link
Copy Markdown
Contributor

Undoes some of the changes in #186 be joining the stable metadata into the same file.

Closes #198.

@Leonidas-from-XIV
Leonidas-from-XIV force-pushed the unify-metadata-again branch 2 times, most recently from 17b50c9 to a1fdb84 Compare February 20, 2026 14:02

@ElectreAAS ElectreAAS left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've taken a look, and while I haven't found any gross mistakes, I gotta say I just don't know enough about the project to take responsibility in approving formally

Comment thread .github/workflows/binary-stable.yaml Outdated
@Leonidas-from-XIV

Copy link
Copy Markdown
Contributor Author

Yes, that's very fair. In an attempt to fill you in a bit: the metadata.json files contain a list of so called "Bundles", that's basically a nightly build or a stable build. These get created by the Github action workflows and committed to the repo every night. This data then gets used by the server to know where to redirect the user when they request the "latest" build (e.g. it checks that there is a build for the requested platform, figures out when it was and decodes this into a the proper URL to forward to).

When I added stable builds I thought it would be necessary to have a different Bundle format for stable builds. But as it turns out it was totally enough to just add an optional tag field (that would contain the release tag name) and... that's it. All the other fields can still be populated and might be useful to some degree so when I talked with @Sudha247 she said (paraphrased) "oh, but why are they then separate files". And then I realized that there is no reason why they would need to be separate files actually and they can be combined back into metadata.json which makes a few things a bit easier (e.g. we can have a command line argument to specify the metadata instead of hardcoding them, we don't need to remember to add both files everywhere necessary etc.).

@Sudha247 Sudha247 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

I have some follow-up questions:

  • Do I understand correctly that this is an internal change on the file representations and doesn't affect external (user-facing) endpoints such as https://get.dune.build/install?
  • Are there plans to display the stable binaries in the nightly site, with instructions on how to install them?

@Leonidas-from-XIV

Copy link
Copy Markdown
Contributor Author

@Sudha247, good questions! To answer them one by one

  • Yes. The outside view should not be affected by this change at all. It's really just basically acknowledging that the format for stable and nightly is the same and avoids a @ operation on lists and makes the UI a bit less wonky. As such only the server (which reads the metadate) and the workflows (which edit the metadata) are affected.
  • Yes, possibly. It's definitely in the realm of possibility, generally the website needs to be somewhat reworked to not only present nightlies but also stable releases. Extend binary installer to support the new /stable endpoint #202 does the first step of providing a download link for the stable release but in the long term listing the releases that have builds would also make sense. I've opened List stable releases on website #204 to track this.

Undoes some of the changes in ocaml-dune#186 be joining the stable metadata into
the same file.

Closes ocaml-dune#198.

Signed-off-by: Marek Kubica <marek@tarides.com>
@Leonidas-from-XIV
Leonidas-from-XIV merged commit c61366a into ocaml-dune:main Feb 23, 2026
3 checks passed
@Leonidas-from-XIV
Leonidas-from-XIV deleted the unify-metadata-again branch February 23, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unify metadata files

3 participants