fix: lib collision public same folder#10
Conversation
Signed-off-by: Javier Chávarri <javier.chavarri@gmail.com>
822b1c1 to
f651140
Compare
src/dune_rules/ml_sources.ml
Outdated
| (* we need to check for private name to avoid "multiple rules" errors, | ||
| because even for public libraries, the artifacts folder still uses | ||
| the private name *) | ||
| let name = Library.private_name part.stanza in |
There was a problem hiding this comment.
I wonder if we should be checking directly what conflicts. In this case, check the obj_dir path equality rather than the private name equality? we have it in group.obj_dir.
There was a problem hiding this comment.
I removed private_name and used obj_dir instead in c1a8628.
imo, as a user the error message is slightly harder to understand because we can't refer to the lib private name anymore, but I don't have a strong opinion. Whatever you and @rgrinberg prefer.
There was a problem hiding this comment.
I do actually prefer the current version than the previous one. This looks way better IMO
…text-libs-fix-public-same-folder Signed-off-by: Javier Chávarri <javier.chavarri@gmail.com>
Signed-off-by: Javier Chávarri <javier.chavarri@gmail.com>
Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
|
OK, so I remembered we actually have a library ID now, which means that we have access to the private name that way. So I restored the error message to the previous version. |
Awesome! |
Solves the problem discussed in ocaml#10307 (comment).