Use dune for installing the files in share#1902
Conversation
b3c9856 to
b96e116
Compare
| cfg: | ||
| # Minimal versions: we want to test both ends of the supported space | ||
| - ocaml-compiler: "ocaml-base-compiler.4.14.0,dune.3.10.0,zarith.1.13,menhir.20231231,logs.0.7.0" | ||
| - ocaml-compiler: "ocaml-base-compiler.4.14.0,dune.3.12.1,zarith.1.13,menhir.20231231,logs.0.7.0" |
There was a problem hiding this comment.
The intent of this CI is to test with minimal versions. Is there a reason why this is not set to what version is promised to be sufficient?
There was a problem hiding this comment.
Sorry I didn't copy the comment from the commit to the first message here, there's no lower version available which is compatible as well:
On the CI workflows, the version cannot be set to 3.11.0 as that version was unreleased, 3.12.1 is the lowest version published above 3.11
relokin
left a comment
There was a problem hiding this comment.
Since this PR dumps the minimum version for dune, we need wider consensus. cc: @fsestini, @maranget, @HadrienRenaud.
@psafont you might also want to update INSTALL.md
Should I also bump dune's required version in |
Difficult to say without testing, but I guess 2 minors version of dune is not a lot so I'd say go ahead. |
|
Thanks @psafont. I like the general direction of this PR, however I'd like to expand on some of its implications a bit more. One thing that the rm -rf "${to}" && mkdir -p "${to}" && ( cd "${from}" && cp -r . "${to}" )
I believe the point of this is to prevent stale files from past installations to survive into the respective As far as I can tell, $ touch ~/.local/share/herdtools7/herd/extra-file
$ make install PREFIX=/Users/filses01/.local
$ ll ~/.local/share/herdtools7/herd | grep extra-file
-rw-r--r--@ 1 filses01 staff 0 8 Jul 10:10 extra-fileNote that I don't disagree with this new behaviour in principle. In fact, I think (un)install scripts in general should not remove entire user directories unconditionally, and the behaviour proposed by this PR follows standard practice AFAICT. So, again, I'm in favour of this change in principle, and I expect it to be harmless in practice as well, since our tools mostly look up specific filenames from the libdirs rather than enumerating or bulk-loading everything in there. However, I think it's an aspect worth pointing out to ensure we are all aware of the implications and are on board with it. |
0b3415b to
50a7ba1
Compare
|
Just found a PR that's superseded by this one: #420 |
|
I've done a bit on investigation regarding the files types in the libdirs and how the tools use them to make sure that adding file doesn't interfere with how they work:
As far as I could see, changing the behaviour there doesn't change other that seeing a warning message when running |
Some of the tools need to have their libdirs copied to a subdirectory in share, use dune to do this instead of using an ad-hoc script Documentation on the share section for install and the globs install can be found at https://dune.readthedocs.io/en/stable/reference/dune/install.html This changes some symbolic links to be normal files, meaning they are now duplicated when installing, this can be seen by diffing the installed directories before and after the change: $ bash -c "diff <(tree -vi /tmp/pre) <(tree -vi /tmp/post)" 1c1 < /tmp/pre --- > /tmp/post 3133c3133 < timebase.c -> timebase64.c --- > timebase.c 3156,3157c3156,3157 < _cache.h -> ../_x86/_cache.h < barrier.c -> ../_x86/barrier.c --- > _cache.h > barrier.c 3164,3165c3164,3165 < mbar.c -> ../_x86/mbar.c < timebase.c -> ../_x86/timebase.c --- > mbar.c > timebase.c On the CI workflows, the version cannot be set to 3.11.0 as that version was unreleased, 3.12.1 is the lowest version published above 3.11
This keeps in line with herdtools7's dune lang requirement
relokin
left a comment
There was a problem hiding this comment.
LGTM! Thanks Pau. If you rebase on top of master, I will merge this PR.
This allows to drop ad-hoc shell scripts that were used for installing the 'libdirs' of the tools.
Dune is able to do install entire source trees starting from version 3.11. The only difference I could see when dune installs is that the symlinks are converted to full files instead of being retained. This affects 4 .c files in litmus, as per the commit message.