-
Notifications
You must be signed in to change notification settings - Fork 409
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
Support for alias in subdirs #771
Comments
Yh, that makes sense. I'm thinking of adding a pass in the compilation of jbuild files down to build rules, so that we can determine the dependencies between directories before generating the rules. For instance this would make it easy to have a single dune file cover several directories. |
Also this is useful to run |
Any sense of whether this is on the near-term roadmap? It would be quite useful for cleaning up some usability issues in the way the RWO build works right now. |
I think there is a simple to make it work, we can include it in Dune 1.0.0. |
Just checking if this is still planned to be included in 1.0? It would be great to have this for RWO. |
Agreed! |
How bad is it at the moment? Note that the 1.0.0 release of Dune is taking longer than usual releases as we want to get the versioning story right and prepare the groundwork for future features we have in mind that require breaking changes. But once it's released we'll resume the usual release schedule. |
We have to generate a lot of custom rules like this one https://github.com/realworldocaml/book/blob/master/examples/jbuild#L4 which reduces the usability a lot (e.g. you have to replace There's also an issue with the generation of |
I see, that's quite annoying indeed. However, looking at this use case it seems to me that #622 would provide an even better solution since you wouldn't even need to generate these stanzas. #622 is a bit ambitious, but we can make it much simpler by allowing the user to set the tool they want to use to run the test. We can even write this information only once in the dune-project file. Technically the result is that you could simply delete the jbuild file you pointed, write one line in the |
Note that it's not only cram tests, we also have ocaml-expect tests: https://github.com/realworldocaml/book/blob/master/examples/jbuild#L2708 But yes, having first-class support in dune for this kind of workflow would be even better :-) Edit: there is also 2 modes of running the cram/expect tests, deterministic and non-deterministic ones so I am not sure how if could fit in #622 (with the current state of the proposal). |
The proposal could cover toplevel expect tests as well, in the end it's all the same idea. Currently how do you decide which which mode to use? |
We generate |
Ok, so here is a proposal: you'd write this in the dune-project file:
and then tests would simply be put in |
That sounds good; I think I would make the Would be nice also if we could parametrise which directory has the tests: we plan to move the |
I am very much in favor of this! I'd love to just have to write: (using cram-style-tests 1.0
(scheme (extension t) (action (setenv MERLIN ${bin:ocamlmerlin-server}
(run cram %{<}))))) just once at the root (though I wouldn't mind to much the alternative of writing |
Any update on that issue? I am looking at RWO again and that would be nice to remove all my weird generated rules and use the default ones from dune instead :-) |
Nothing so far, but this is not forgotten. We'd like to have this for dune itself and the OCaml compiler as well. |
Is still planned? Or will the new computational model obsolete this? |
@rgrinberg no, but in the end the new feature to add to dune is the new scheme for cram like tests, not aliases in sub-directories |
So then we should close this issue. The new scheme for cram like tests exists in another ticket I think. |
Indeed, it's #622 |
:-( I am still very interested by the ability to create alias in subdirs. I still have the same use-case: #771 (comment) |
This will be covered by #622. The |
Would be great to support things like:
This would allow to have a
jbuild-ignore
file ignoring the contents of thefoo
directory, while havingjbuilder build @foo/bar/runtest
still working. This is useful for instance whenfoo
contains documentation code examples that you want to test but not to be scanned while compiling the project.(This is related to #761)
The text was updated successfully, but these errors were encountered: