-
Notifications
You must be signed in to change notification settings - Fork 18
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
Inheriting :test-paths and other paths #68
Comments
It sounds like the desire here is wanting to share a set of relative paths among all projects; I'm definitely curious what the concrete use-case is. Making this change seems like it would break a different capability, which is sharing a single directory (with an absolute location) among all subprojects. I don't know if anyone is relying on that behavior right now, but this would be a breaking change. |
Yeah, it's just so subprojects can inherit the relative directories, so that they don't all have to specify them—for instance, if you know that the project is going to have multiple test suites under different directories, or if you wanted to apply a different target-path to all subprojects. |
🤔 Interesting - would it work to use Leiningen's
(based on a snippet from an alias we use to run Clojurescript tests) Admittedly, that only works on the specific command, rather than by default, but maybe that's enough for your needs. If we were to add the path relativization, I think it would need to be opt-in somehow. |
This would be a great situation for metadata…except you can't attach meta to Strings. :( Perhaps the :monolith {:inherit [{:test-paths ["test/unit" "test/integration"]}]} This would be forward and backward compatible. Alternatively, there could be another key like :monolith {:inherit-raw [:test-paths]} Which could then read the project in its raw state and pass the values in unaltered. |
I put up a PR that implements the first pattern—what do you think? |
Hey, sorry for the radio silence. Thanks for the PR - I think the alternate version you suggested above would be less confusing overall. We already have precedent for different behavior with different keys, using One thought I have is how we would allow some relative and some absolute paths, but since there's no support for relative paths yet at all I think that can wait for a future change. 🤔 |
Opened a proof-of-concept here: #75 EDIT: it is done |
It appears that Leiningen absolutizes all paths at project load time. This breaks
monolith/inherit
ing of paths, as the inherited paths will always be absolute and in the root monolith project. This manifests as build errors when monolith attempts to re-absolutize an already absolute path. Would it be sound to strip the root from the paths before adding them to the inherited profile so that paths can be specified in the root monolith project?I can provide a repro project when I'm not on my phone.
The text was updated successfully, but these errors were encountered: