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

Support composite builds #40

Open
rgoldberg opened this issue Jul 5, 2018 · 2 comments
Open

Support composite builds #40

rgoldberg opened this issue Jul 5, 2018 · 2 comments

Comments

@rgoldberg
Copy link

Please support composite builds.

If they are currently supposed to work, then please let me know and I'll try again to get Chainsaw 0.3.1 working with my Gradle Wrapper 4.8.1 composite build (on Java 10.0.1+10).

@rgoldberg
Copy link
Author

rgoldberg commented Jul 9, 2018

If I have an included build (the dependent build) that depends on another included build (the dependency) through dependency substitution in the composite build:

  • the dependency is built
  • the dependent build's module path includes the class output directory for the dependency, but the dependent build's javac execution doesn't see the output of the dependency, as indicated by outputting error: module not found errors
  • if I iteratively build the composite build:
    • on the first iteration, included builds that do not depend on other included builds build fine, by dependents fail
    • on the subsequent iterations, included builds that only depend on other included builds that have already been built by a previous iteration build fine, by any builds dependent on not-previously-built included builds fail

So, I can eventually get my whole composite build to work, but it takes multiple iterations.

It seems possible that Gradle is building included builds in parallel, and that Chainsaw is not setting up some Gradle included build dependencies properly to force dependencies to to build before dependents. Or, it's possible that Chainsaw is setting up dependency relationships in a reverse order, etc.

I tried to disable parallel builds, but it seems like that didn't work. I've read somewhere that composite builds are always parallel, but I'm not sure if that's correct. If you know how to disable parallelism in composite builds, please let me know.

@rgoldberg
Copy link
Author

Chainsaw needs to use CommandLineArgumentProvider instead of adding Strings to compileJava.getOptions().getCompilerArgs().

See Stefan Oehme's (the Gradle core team lead) post at:

https://discuss.gradle.org/t/how-does-a-composite-build-ensure-that-one-included-build-is-built-before-another/27711/2

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

No branches or pull requests

1 participant