Conversation
28175f9 to
adaa913
Compare
Leonidas-from-XIV
left a comment
There was a problem hiding this comment.
Thanks for the PR, I've got a few comments, mostly about the readability of the code.
f76fa7a to
e4c2a39
Compare
|
Thanks for the review. Catching the return code and the error message like this is not portable (even between macOS and Linux). I'm tempted to do, if there is no better alternative, if ! echo plop >file 2>/dev/null; then >&2 echo "file: Permission denied"; exit 1; fi |
|
I think the test could also be changed to check whether the flags are set, so something like |
e4c2a39 to
db39536
Compare
I'm a bit worried about the test-suite errors actually. I will re-review when those are fixed.
|
One of the things I suggested in the original issue was to make this change gated on dune-lang 3.21, to not break users that depend on potentially writing to the file (however I don't know if that would actually affect anyone, so maybe ok to include it in the alpha-release and see if the revdeps have failures). |
1e7249d to
d464904
Compare
|
Thanks all for the pointers. The patch is nicer now, and the CI is passing. |
Signed-off-by: Antonin Décimo <antonin@tarides.com>
e490798 to
c2a4aac
Compare
I came to this issue to ask for the same, this seems like a user impacting change, so indeed gating it under I am positive that there are lot of projects in the Rocq land (jsRocq, industrial users) that are not in opam, so the impact of these kind of changes are hard to evaluate until dune is fully released. |
(🙈🙉🙊 is this why we have patch releases) |
This adds a mechanism to thread the workspace level dune lang through the workspace resolution code and guard the permission changes added in ocaml#12519 with 3.21. Signed-off-by: Ali Caglayan <alizter@gmail.com>
This reverts commit bcf3242.
This reverts commit bcf3242. Signed-off-by: Shon Feder <shon.feder@gmail.com>
This reverts commit bcf3242. Signed-off-by: Shon Feder <shon.feder@gmail.com>
Files promoted to the source directory should be read-only because they are generated. If they're edited, they're going to be eventually overwritten by a following build. Setting them read-only would prevent user confusion.
In this case, read-only would only be useful for humans, and Dune should make the file writable again if it needs to overwrite it.
If the user need to overwrite a promoted file, for instance before distributing a source archive, then she needs to manually set the write permission.
Fixes #12465.