-
Notifications
You must be signed in to change notification settings - Fork 415
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
test: show that universal libraries can't share the public_name #10471
test: show that universal libraries can't share the public_name #10471
Conversation
@@ -0,0 +1,64 @@ | |||
Public libraries using the same `public_name`, in different contexts |
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.
Could you describe the test a bit more here? It should be possible to know what it's about without knowing any context.
I talked about this with @andreypopp offline, the problem is that we have been using two contexts in a single opam switch until now. But installing public libs with the same name should be possible if each context was linked to a different opam switch, using st like |
I tried using
I fail to see how the premise of this PR would work. How can we avoid the proliferation of |
Indeed, I believe they're coming from |
Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
2b3c2dd
to
c9cd9dc
Compare
@rgrinberg thanks, I made the description a bit more clear. |
@@ -0,0 +1,65 @@ | |||
Show that public library names can't be defined twice, even in different | |||
contexts |
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.
It's worth adding a statement on if this is a bug or an intentional limitation.
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.
to be honest, we're not sure. It depends a bit on the usage, and how they're installed:
- for Melange libraries that clash, it's not a problem if they have the same public name, as we install melange artifacts under
<lib_name>/melange
anyway. - for other libraries, if we decided to install them in the same context, they would be overwritten.
We're working on an installation RFC with the aim of making a special case for a "melange context" that can be installed in the same prefix as native libraries with the same name.
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.
Okay, well I think this particular issue is easily fixed. We just ignore libraries with enabled_if
for the purposes of libname_conflict_map
.
…l#10471) * test: show that universal libraries can't share the public_name Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com> * chore: describe the test a bit more clearly Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com> --------- Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
…l#10471) * test: show that universal libraries can't share the public_name Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com> * chore: describe the test a bit more clearly Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com> --------- Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
Inspired by a question from @andreypopp.
This is a bit of a sad limitation, because it means
enabled_if
just proliferates when depending on installed libraries.