-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add package for Topiary v0.1.0 #23771
Conversation
This seems reasonable to me. @avsm what do you think? |
Updated numbers with this week's Docker images:
The change is due to Cargo/Rustc 1.65 reaching Alpine's packages and Archlinux resolving their download issue. It would be interesting to understand the errors on CentOS and openSUSE but I have no idea how to investigate this. We find basically the same errors in tweag/topiary-opam and ocaml/opam-repository's CIs (which is reassuring tbh). |
I'm fine with this too. Let's use this as an opportunity to improve the cross-language configuration support within opam-repo, since Rust is here to stay! |
Maybe this can helpe: of you look at the top of the logs, there is a code that you can copy/paste to reproduce the issue with docker. For example, for one of the suse tests:
|
I agree that the errors are very explicit and clear, and they are common to the rust packages, so I don't think they should block the merge. Thanks for the contribution! |
Thank you for that! I will look into that and try to see whether it's a problem coming from upstream or from my packaging in OPAM. Hopefully I can figure that out before v0.2.0!
Thank you! 🎉 |
This pull requests adds a package for Topiary in version 0.1.0 (“Benevolent Beech”). From the point of view of opam-repository and OCaml users, Topiary is an alternative formatter for OCaml. The upstream changelog can be found here.
The main point to note about this package is that is is not an OCaml package: Topiary is written in Rust. However, it can be interesting to publish in opam-repository because it allows formatting OCaml files and could be useful for the community. Some context on this question as well as the idea behind the packaging solution can be found in this discuss thread.
Apart from the problem of whether we accept packaging a Rust program in opam, there is also a technical issue: Topiary requires Cargo/Rustc in version at least 1.65. This version is fairly recent and might not be present in all distributions. In fact, the CI of the tweag/topiary-opam repository keeps track of this. Out of 11 distributions provided by the
ocaml/opam
DockerHub images:ocaml/opam
DockerHub images.)The errors are always fairly understandable. In the case of Debian stable that does not even have the 2021 edition of Cargo/Rustc:
and in the other cases, eg. Debian unstable, that have the right edition but still not recent enough:
I therefore expect the CI of opam-repository to report the same kind of issues.
Now I am still not convinced whether it is fine to publish a Rust executable in opam-repository but it is not really for me to decide. The discuss thread linked above seemed to show that people were indeed interested in getting Topiary distributed via opam, but we could also decide that it is not the right way and that Topiary should be acquired from other sources, be it via Nix, Cargo itself, or by
opam pin
ning the tweag/topiary-opam repository. In a few years, after Topiary stabilises and after package sets get updated, Topiary should be available easily as a normal system dependency.