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

:sub-project arg for lein modules #30

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

alexdforeman
Copy link

HI Jim,
In our project we have approx 10 submodules which are interconnected in many ways.
lein modules always runs the selected task against all of them. Whilst this is awesome, for a developer working in the middle of the stack to reduce feedback time from testing we have implemented :sub-module which builds the project they are working on and only the other modules which it depends on instead of the entire stack.

I can see other people finding this option very useful so we are contributing it back to you so others can gain this efficiency as well.

I've updated the README as well as documenting the modules method.

Please let me know if anything is amiss.

I've fully tested it on our stack, but unfortunately I do not have a automated test yet.

I hope this helps :D

P.S please get in touch for any questions either through here or by priv mail. Many thanks

@jcrossley3
Copy link
Owner

Hey, this is cool! Thank you! :)

@jcrossley3
Copy link
Owner

This is a great new feature, but the current implementation breaks the sometimes-handy ability to see a dump of a project's modules when no task is passed. Also, we don't want to overflow the stack when no modules are present. I just pushed some tests to master that validate those features. You should be able to rebase from master and see where the failures are.

Also, in studying your code, I might recommend altering your approach to take advantage of the interdependencies function, which you can compose with progeny to get a map of each module's dependencies. This basically lets you construct a correct :dirs argument, and another recursive call would get the order correct.

Two minor concerns: I'm not crazy about the -modules helper and I kinda want to rename the :sub_module option to :only. I think. Maybe.

Don't mean to sound unappreciative. I love the idea! :)

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 this pull request may close these issues.

3 participants