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

Strict dependency checking and enforcement. #438

Merged
merged 3 commits into from
Jan 8, 2021

Conversation

jongerrish
Copy link
Contributor

@jongerrish jongerrish commented Jan 3, 2021

Add Toolchain parameter:

experimental_strict_kotlin_deps with values "off", "warn", "error"

Provides checking and enforcement if a dependency required for compilation is not explicitly listed in a targets 'deps'

@google-cla
Copy link

google-cla bot commented Jan 3, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

compiled output with the Sun JDeps tool) happens only on Java classes
compiled by the KotlinBuilder. i.e: Java compilation when
`experimental_use_abi_jars = False`.

1. Use the existing unused `--output_deps_proto` flag which mirrors the
   parameter used by the Bazel JavaBuilder, this is passed to the legacy
   JDepsGenerator.
2. Use a separate `java_classes` output dir to separate Kotlin compiler
   output from Java compiler output. The JDepsGenerator now only runs
   on `java_classes`.
3. Merge separate Kotlin + Java Jdeps just as is done already with the
   new `experimental_use_abi_jars = True` flow.
@jongerrish jongerrish changed the title [WIP]: Strict deps Strict dependency checking and enforcement. Jan 3, 2021
@restingbull restingbull merged commit 9e36fca into bazelbuild:master Jan 8, 2021
@jongerrish jongerrish mentioned this pull request Mar 5, 2021
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.

2 participants