Skip to content
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

Apply different profiles to different directories #2260

Closed
NathanReb opened this issue Jun 7, 2019 · 2 comments · Fixed by #2318
Closed

Apply different profiles to different directories #2260

NathanReb opened this issue Jun 7, 2019 · 2 comments · Fixed by #2318

Comments

@NathanReb
Copy link
Collaborator

This is slightly related to the vendoring story described in #2259.

The issue is that if I vendor external sources in my project, there currently seems to be no way to build them with a different profile from the one I use to build my own.

A good example of why this is a problem is warnings. I want warnings from my own code to be fatal but I don't necessarily want that for vendored libraries.

It would be great to be able to force anything in a vendor directory to build with the release profile or even better, to silence any warning in there so they don't pollute the builds standard output.

I feel like being able to select a default profile that apply recursively to a directory from a dune or dune-workspace file would be helpful. I assume it should have lower precedence than the CLI profile option so that you can still overwrite it if you wish.

Is there any particular reason why this behaviour isn't currently supported and does that seem sensible/achievable?

I'm as always happy to help implement that feature if you feel like it's a worthy addition!

@NathanReb
Copy link
Collaborator Author

cc @emillon @avsm

@ghost
Copy link

ghost commented Jun 7, 2019

Yeah, this has come up a few times. dune files don't seem like the right place for such settings as they are project specific and dune ensures that project specific settings don't leak to other projects.

The dune-workspace file seems like a good candidate. However, they can be only one dune-workspace file, so we would have to specify the vendored path inside it, which is not very consistent with the way things usually work in dune. i.e. if you renamed the vendored directory you'd have to edit the dune-workspace file as well. We could also introduce a new dune-vendor kind of files. It seems worth thinking about this in the context of #2259 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant