opam-bundle icon indicating copy to clipboard operation
opam-bundle copied to clipboard

added shell/bundle_all_test.sh

Open UnixJunkie opened this issue 6 years ago • 6 comments

I hope each execution of opam-bundle is independant, so that we can run many in parallel.

UnixJunkie avatar Dec 03 '18 02:12 UnixJunkie

related to https://github.com/AltGr/opam-bundle/issues/8

UnixJunkie avatar Dec 03 '18 03:12 UnixJunkie

This seems useful! The real test would be to try and actually install the generated bundles though :) One thing: the shell/ directory is at the moment used to contain the scripts that are included in the bundle and part of the binary itself. Maybe it should be renamed to shell_src/ or something like that, but I don't think test scripts should be in the same directory.

AltGr avatar Dec 03 '18 10:12 AltGr

I renamed the file to scripts/bundle_all_test.sh.

UnixJunkie avatar Dec 04 '18 08:12 UnixJunkie

To install all of them, I should setup some VM obviously. It is annoying that so many packages have "No solution".

UnixJunkie avatar Dec 04 '18 08:12 UnixJunkie

Thanks!

It is annoying that so many packages have "No solution".

It's just because the OCaml version is fixed at bundle creation time, I think. Opam has a feature to automatically select a compatible compiler (used when you do opam switch create ., for example), but opam-bundle can't easily use that at the moment. So what happens in the script is that the OCaml version is fixed to the default¹, and any packages that require a different version end up with "No solution". This is also bad because some packages could end up bundled with an older version because of an older compiler.

Ah, also, just noticed, you should use opam list -s rather than opam search | awk '!/^#/{print $1}'.

¹ the default is to use the currently installed OCaml version (at bundle creation time), and failing that, 4.04.1

AltGr avatar Dec 04 '18 12:12 AltGr

Ok, I didn't know about opam list {--short|-s}. I use it now.

UnixJunkie avatar Dec 05 '18 01:12 UnixJunkie