GNU bug report logs -
#49958
[PATCH] More flexibility in opam importer
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 21 Aug 2021 00:07:48 +0200
with message-id <20210821000748.59cce44e <at> tachikoma.lepiller.eu>
and subject line Re: [bug#49958] [PATCH] More flexibility in opam importer
has caused the debbugs.gnu.org bug report #49958,
regarding [PATCH] More flexibility in opam importer
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
49958: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=49958
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
Hello,
I'd like to submit this patch for review, discussion and hopefully
inclusion to guix' code. I recently tried to import grew[0], a NLP tool
written in ocaml and distributed with opam but from a custom repository.
The current importer prevented me to do so for several reasons:
- the available repositories were hard-coded to be either opam's
official repository or coq's
- the repositories were expected to be distributed with git: while
public git repositories do exist for coq and opam's official
repository, they are not the source of truth for the opam tool one
can use in an imperative setup like this:
`opam repo add coq-released https://coq.inria.fr/opam/released`
it entailed that assumptions were made about the freshness of the git
repositories and the actual files served to opam, hence differences
could theoretically be observed
- it appears that the opam tool doesn't enforce as strict a structure on
its repositories as its current documentation[1] suggests. Grew's own
repository has all versions of each package directly under
`/packages/` instead of in a separate subdirectory. While this
deserves a clarification from opam's part, this patch hardens guix
opam importer against such exotic layouts.
- the unability to query several repositories at once rendered
recursive imports inefficient, as some packages on a custom
opam repository may still need dependencies from the official opam
repository even if no guix package has been imported for it yet (this
was the case with ocaml-ANSITerminal in my case)
The current proposal attempts to solve these difficulties, and allowed
me to actually import the guix declaration for grew and its
dependencies. I'm still fixing the imported declaration and intend to
submit a separate patch to add it to guix packages when it works. I
added grew's custom opam repository to the list of known-repositories
because it was my immediate target but this is of course not important
and could be reverted in favour of coq and opam's official repository
only.
I used the emacs scripted auto-indenter to save a little time to my
reviewers and had to discard many changes that weren't related to my
changes to cut the noise. Maybe this file should be reindented in a
separate commit following the approval or rejection of this patch
proposal.
Cheers,
Alice
[0]: https://grew.fr/
[1]: https://opam.ocaml.org/doc/Manual.html#Repositories
[0001-guix-opam.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
Le Fri, 13 Aug 2021 15:47:17 +0200,
Alice BRENON <alice.brenon <at> ens-lyon.fr> a écrit :
> Re-phrased the new documentation explaining how versions are selected
> from the repositories in case several contain the same package.
>
> Sincerely hope it's the last one : )
Pushed to master as fc29c80b9635ff490bcc768c774442043cb1e231, thanks!
This bug report was last modified 3 years and 336 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.