-
Notifications
You must be signed in to change notification settings - Fork 410
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
Controlling precedence of data_only_dirs vs vendored_dirs #7589
Comments
I'm not sure about that. The various stanzas that control directories suffer the same issues as the modules fields (#7026) - they have subtle interactions and that's not a great way to expose the underlying model. A better way would be to set the configuration for each directory, but we don't have that at the moment. To getback to your issue: you're trying to vendor a project that vendors a project, so it creates a conflict because the workspace contains two copies of the dependency. If that's not an option, then a dune feature is required to control which configuration wins. One way to do that in the current dune model would be to make a workspace configuration that would control that. (note that workspaces do not compose, so it would not be possible to embed solver-service in another project and have this configuration working). |
At the current implementation the
We had this in mind, combined with the rate of the dev and correcting bugs it could be painful, this is why we proposed the PR. |
As a general principle, I don't like "overrides" or "priorities" as a user facing feature. We've violated that principle plenty of times already with regrettable results (see the env stanza). If we need to implement something more complicated to avoid such anti-patterns, then so be it. In this particular case, it would mean:
|
What about a new status
|
The current stage of dune about directory status is:
You can't have
data_only_dirs
andvendored_dirs
at the same time and that is logic.But you can have
(dirs :standard \ subproject)
combine with(data_only_dirs subproject)
or(vendored_dirs subproject)
.The status
(data_only_dirs subproject)
or(vendored_dirs subproject)
override(dirs :standard \ subproject)
, why this specification ?And what is weird to me is
(dirs :standard \ subproject)
is equivalent to(data_only_dirs subproject)
.The need we have is at the moment is:
A possibility,
(dirs :standard \ subproject)
overridedata_only_dirs
and/orvendored_dirs
instead inverse. This avoids the conflict(ocaml-dockerfile) described below.An example: this is a partial tree of solver-service
The central point of this PR is to introduce or improve the spec around
statuses
:Getting the prioritization as following
(dirs :standard \ subproject)
->(data_only_dirs subproject)
->(vendored_dirs subproject)
.It is opened to modification, to get the possibility that
(dirs :standard \ subproject)
overridedata_only_dirs
and/orvendored_dirs
without touching the previous relation betweendata_only_dirs
andvendored_dirs
.Originally posted by @moyodiallo in #6577 (comment)
The text was updated successfully, but these errors were encountered: