-
Notifications
You must be signed in to change notification settings - Fork 3
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
Recursive module publishing #194
Conversation
…s to be published by invoking .publishLocal command
trait RecursivePublishModule { self: BaseScalaModule => | ||
def publishLocal(localIvyRepo: String = null): Command[Unit] = Task.Command { | ||
T.traverse( | ||
this.moduleDeps.flatMap { | ||
case m: RecursivePublishModule => m.moduleDeps | ||
case m => Seq(m) | ||
}.collect { | ||
case m: PublishModule => m | ||
} | ||
)(module => module.publishLocal().t)() | ||
Result.Success(()) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to define a similar publish
method too, to support real publishing?
Also, my assumption is that this will attempt to publish all the modules exactly once because (and only because) it's the direct dependencies of the soundness
"bundle" modules, which refer to each of the real modules exactly once. That's probably fine: if a module gets forgotten because it's not included as a direct dependency of one of the bundles, then the first time we try to resolve it from a build tool, we will discover that it's not been published.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think yes, we do
this is also correct, it only publishes modules that are included in one of the soundness.* module dependencies
But you want to be able to just publish ALL modules, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine. Would you like me to merge this as-is, or should I hang on for a publish
implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll play with it a bit more - i'll give you green light, when im done
merge pls |
Thank you! |
for every module that extends
RecursivePublishModule
-publishLocal
command will instead callpublishLocal
command for all of it's moduleDeps that extendsPublishModule
trait. also there is support forall
module, which will resolve dependencies of it's child modules like web or test.It doesn't go deeper than that, so that dependencies of modules that extends
PublishModule
are not included.