-
Notifications
You must be signed in to change notification settings - Fork 412
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
toggle ignore_subdirs by workspace #1184
Comments
Would a command line flag work? we already have flags to control how promotion works for example. |
I think adding a command line option for often used configurations is a good idea, but I dislike having cli only configuration for most options. There are some special cases where a cli only option make sense, but this doesn't seem like one of them. |
Which command line option did you have in mind btw? A way to toggle to ignored sub directories in the build? |
If it's an option that you need to pass to every invocation (build, runtest, ...) then an option in the workspace configuration file seems good. I admit that I don't fully understand the use case for this feature. Is it basically like an optimization? i.e. you already installed the dependencies via opam so you don't want to recompile them again? |
I haven't thought this through, but yes I was thinking something like |
@dim, the motivation is due to needing the flexibility in cases like this:
In this case, I had to Also, it would be useful to have a workspace that uses the opam libs, and one which uses the locally vendored libs, to test that both work. |
Thanks, I understand better why we need this. Having it in the workspace file seems fine. |
When experimenting with vendoring dependencies in Dune, I noticed that it would be useful to be able to toggle the use of vendored files at build-time. For example, if there is a directory called
vendor/
in a repository, then it could be compiled in a few scenarios:vendor/
directory should be ignored since the dependencies can be satisfied by opamThe workspace feature seems like a pretty good fit for this, but we need to extend it to add the facility to use the
ignore_subdir
command that is in adune
file at the moment.A workaround at the moment is to use an OCaml-generated
dune
file and test for an environment variable or similar to include the clause, but I'd like to avoid that if possible.The text was updated successfully, but these errors were encountered: