-
Notifications
You must be signed in to change notification settings - Fork 437
fix: relative paths in dune-package #5394
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
fix: relative paths in dune-package #5394
Conversation
We have no guaranty that the destination of the sections during installation have not been set, with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't get what was exactly the bug, so if it touches only files in _build
the fix is ok. Otherwise we should really take time to change Path.reach
for external path (there is an open bug for it also related to sites #5322 )
; field_l "sections" (pair Section.encode string) sections | ||
; field_l "sections" | ||
(pair Section.encode (Dpath.Local.encode ~dir)) | ||
(Section.Map.to_list sections) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to Path.reach
keeping external path unmodified, it will not changed installed dune-package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the tests demonstrate that it does. So I guess we aren't using external paths here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests are looking at dune-package
in _build/install
not really installed dune-package
in opam switch or /usr
.
Consider the error in #5393 There's failures like:
Because we're using incorrect absolute paths in the dune-package file.
Are you talking about external paths to files in the _build dir? I don't think that works. |
No, I'm talking about the installed |
For #5393, I think the problem is more with the substitution of the path in the |
It is possible that #4861 was wrong because dune-site is not the only one to need the substitution. |
What paths are external? I don't see any external paths in the dune-package after this PR. |
f29d1b7
to
8ecb536
Compare
@bobot I added a couple of commits with external package deps, and the relative paths seem to fix the issue. |
ping @bobot |
cf5f38a
to
915ff37
Compare
Thanks for the ping, I added the tests from #5404 and a test for share. |
915ff37
to
cd5592c
Compare
ps-id: F3A61F3B-1DE0-4B25-BEC9-22AEB65806FF Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
ps-id: CB2B45B9-655B-4E2B-858A-70BD7F013C83 Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
use relative paths for package sections Signed-off-by: Rudi Grinberg <me@rgrinberg.com> ps-id: 61A22807-300A-408D-B3A0-D9E4D6A2A39E
Signed-off-by: François Bobot <francois.bobot@cea.fr>
Signed-off-by: François Bobot <francois.bobot@cea.fr>
cd5592c
to
9b6c677
Compare
Thanks. The tests look good. |
use relative paths for package sections
@bobot why do we need to include the sections in the dune-package at all?