You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is here that the (system ...) function is opaque for dune and no information about the command used is known to dune so the parser module will be reused when it should not.
One way to fix that would be to define a proper rule for this module, then dune would know that it depends on camlp5 and would know when to not reuse the same output.
This works, however I'm creating this issue because I think the (system ...) command should be better advertised as being potentially unsafe. Maybe using a warning, renaming it to (unsafe_system ...) or something like that or even simply remove it in some way or another to force the users to use proper rules.
Specifications
Version of dune (output of dune --version): 2.1.3
The text was updated successfully, but these errors were encountered:
This works, however I'm creating this issue because I think the (system ...) command should be better advertised as being potentially unsafe. Maybe using a warning, renaming it to (unsafe_system ...) or something like that or even simply remove it in some way or another to force the users to use proper rules.
system is just as unsafe as bash in this context. I think unsafe is the wrong to characterize this however. The contract for these general actions is that the user must specify targets and dependencies manually & we've added a sandbox mode to ensure that this is indeed the case. I would suggest that we start encouraging users to make sure their rules work with sandboxing whenever possible.
To dune, this is just an opaque string (where it will interpolate %{input-file}). It does now know that this uses camlp5o. The right fix in that case is to use (run) which declares a dependency to the executable, and also for a better solution turn pa_extend.cmo etc to %{dep:pa_extend.cmo} if they are part of the build directory.
While testing the dune cache system, I encountered an issue with
elpi
in the forme of the following error message:The issue here is that they use the
(system ...)
command to pre-process one of the module usingcamlp5
: https://github.com/LPCIC/elpi/blob/e0492dbf7196861c2afbb72fb05ab2774c79f965/src/dune#L8The issue also happens if we build the project under one opam switch and then again with another one. For instance:
The issue is here that the
(system ...)
function is opaque for dune and no information about the command used is known to dune so theparser
module will be reused when it should not.One way to fix that would be to define a proper rule for this module, then dune would know that it depends on
camlp5
and would know when to not reuse the same output.This works, however I'm creating this issue because I think the
(system ...)
command should be better advertised as being potentially unsafe. Maybe using a warning, renaming it to(unsafe_system ...)
or something like that or even simply remove it in some way or another to force the users to use proper rules.Specifications
dune
(output ofdune --version
): 2.1.3The text was updated successfully, but these errors were encountered: