Repository navigation
Conversation
|
Could you split the reproduction case into a separate PR? |
<!-- Thank you for contributing to dune! For general guidelines on contributing to dune, see https://github.com/ocaml/dune/blob/main/CONTRIBUTING.md#developing-dune --> ## Description <!-- Briefly describe your changes --> See #16326
|
@Janno I've merged the test, can you rebase? |
246fe52 to
ab5c4d3
Compare
Signed-off-by: Jan-Oliver Kaiser <janno@skylabs-ai.com>
ab5c4d3 to
9a9c166
Compare
|
@Janno The issue mentioned in the PR description don't seem to be related. For instance, you are explicitly using Could you explain why broken symliks in |
|
I am not sure the division is as strict as you say. As mentioned in the PR description, I have seen this problem pop up very frequently when running cram tests that use Rocq while Rocq itself is in the workspace. Maybe it's just because we need to use There is also special logic in Rocq itself to figure out the paths of where libraries will end up when Rocq is in the workspace. Maybe there is some problem with absolute versus relative paths there that makes I believe that I have seen the problem pop up outside of cram tests as well but I do not remember in which context. |
We still have this in some of our tests, but I don't think this is necessary anymore. This might have to do with Rocq now trying to find these directories using a relative path from its own binary. |
Description
dunedoes not clean symlinks in_build/installwhen the underlying files need to be rebuild. In various scenarios, this can lead to failures in unrelated theories when they scan all "installed" rocq theories. I think it only happens when rocq is in the workspace but I am not 100% sure. It definitely does happen when rocq is in the workspace and when it is used in cram tests that get executed at the same time that unrelated theories get their artifacts cleaned and rebuild (leaving broken symlinks momentarily).The solution in this PR is to test for existence of the symlink target before adding it to the memo.
I have added a very hacky test that forces the issue to appear in a somewhat unrealistic way. Unfortunately, all my attempts to do anything with an up-to-date, real rocq in the workspace are failing for many different reasons and the one working setup that I have requires a bunch of custom patches that no longer work against rocq/master and the version of rocq used is not compatible with dune/main.
Related Issue and Motivation
The problem has been mentioned in #6015 (comment) and it is still a problem to this day.
This is probably related to #7580
Checklist