Fix regression introduced in #271 for legacy use of "jars" in kt_jvm_import #276
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Only propagate srcjar if it isn't the default empty jar added in ae70089 to fix bazelbuild/intellij#1616
This fixes a regression introduced in #271, which fixes a bug in intellij by adding a default srcjar if there isn't one. This broke legacy handling of the
jars=
attribute in kt_jvm_import, when the importedjars=
attribute had a-sources.jar
in the resulting files. By not using srcjar you get the default, plus you get the extra -sources.jar, which blows up the "only one source jar" assertion. This just only propagatessrcjar
into the legacy handling IF it isn't the default value.Also remove a print statement that leaked in, and fix a bad type issue in the fail() of the above-mentioned assertion code, which was surfaced when this mode came into existence.
This only occurs when using
kt_jvm_import(jars=)
, which is already legacy and slated for removal. We may just rip out the facility, but for now, we support it.