Skip to content

Commit 4406c50

Browse files
author
James Judd
committed
Handle rules_jvm_external's processed_ prefix for jars in addition to header_
This fixes jars being missed in the Scala SDK finder/creator.
1 parent 1e2d0bf commit 4406c50

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

scala/src/com/google/idea/blaze/scala/sync/BlazeScalaSyncPlugin.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,17 @@ public void updateProjectStructure(
165165
// jar manifest for third party libraries. This breaks the Scala IntelliJ plugin in some ways.
166166
// This gets around that in the Bazel IntelliJ plugin, but doesn't fix the places the Scala
167167
// IntelliJ plugin checks that jars start with scala-library or similar.
168-
String rulesJvmExternalPrefix = "header_";
169-
if (libraryName.startsWith(rulesJvmExternalPrefix)) {
170-
libraryName = libraryName.substring(rulesJvmExternalPrefix.length());
168+
String rulesJvmExternalPrefixHeader = "header_";
169+
if (libraryName.startsWith(rulesJvmExternalPrefixHeader)) {
170+
libraryName = libraryName.substring(rulesJvmExternalPrefixHeader.length());
171+
}
172+
173+
// Same issue as above, but for the prefix "processed_" instead of "header_"
174+
// TODO: we should figure out if we should be getting the header_ or processed_ jars
175+
// or if there's a way for us to get the jars without a prefix instead
176+
String rulesJvmExternalPrefixProcessed = "processed_";
177+
if (libraryName.startsWith(rulesJvmExternalPrefixProcessed)) {
178+
libraryName = libraryName.substring(rulesJvmExternalPrefixProcessed.length());
171179
}
172180

173181
// Go find the highest version of all the Scala SDK deps in the project LibraryTable

0 commit comments

Comments
 (0)