Imported BEF projects can have a circular dependency #197
Labels
BEF
Bazel Eclipse
bug
Something isn't working
EPIC: BEF import redesign
Issues related to import of pkgs into BEF
Given these bazel packages/targets:
And these references:
Bazel is ok with this because it can build in order:
However, for BEF this is a problem because we create one Eclipse project for
//libs/l1:* and one for //libs/l2:*, and the target dependencies create a
circular reference between these two projects, which is not allowed by
Eclipse.
Best case, the import actually succeeds but the project references are wrong:
Eclipse project l1 references Eclipse project l2, but l2 references libl1.jar (not the imported project, but the compiled jar)
Worst case, we get into an infinite loop (stack overflow) when trying to compute
the project order:
java.lang.RuntimeException: java.lang.StackOverflowError
at com.salesforce.bazel.eclipse.projectimport.flow.FlowProjectImporter.runFlows(FlowProjectImporter.java:90)
at com.salesforce.bazel.eclipse.projectimport.flow.FlowProjectImporter.run(FlowProjectImporter.java:71)
at com.salesforce.bazel.eclipse.wizard.BazelProjectImporter$1.run(BazelProjectImporter.java:33)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: java.lang.StackOverflowError
at java.base/java.nio.Buffer.(Buffer.java:222)
at java.base/java.nio.CharBuffer.(CharBuffer.java:281)
at java.base/java.nio.HeapCharBuffer.(HeapCharBuffer.java:75)
at java.base/java.nio.CharBuffer.wrap(CharBuffer.java:393)
at java.base/sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:280)
at java.base/sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125)
at java.base/java.io.OutputStreamWriter.write(OutputStreamWriter.java:211)
at java.base/java.io.BufferedWriter.flushBuffer(BufferedWriter.java:120)
at java.base/java.io.PrintStream.write(PrintStream.java:605)
at java.base/java.io.PrintStream.print(PrintStream.java:745)
at java.base/java.io.PrintStream.println(PrintStream.java:882)
at org.apache.felix.gogo.runtime.threadio.ThreadPrintStream.println(ThreadPrintStream.java:179)
at com.salesforce.bazel.sdk.model.BazelDependencyGraph.isDependencyRecur(BazelDependencyGraph.java:236)
at com.salesforce.bazel.sdk.model.BazelDependencyGraph.isDependencyRecur(BazelDependencyGraph.java:256)
at com.salesforce.bazel.sdk.model.BazelDependencyGraph.isDependencyRecur(BazelDependencyGraph.java:256)
at com.salesforce.bazel.sdk.model.BazelDependencyGraph.isDependencyRecur(BazelDependencyGraph.java:256)
at com.salesforce.bazel.sdk.model.BazelDependencyGraph.isDependencyRecur(BazelDependencyGraph.java:256)
at com.salesforce.bazel.sdk.model.BazelDependencyGraph.isDependencyRecur(BazelDependencyGraph.java:256)
at com.salesforce.bazel.sdk.model.BazelDependencyGraph.isDependencyRecur(BazelDependencyGraph.java:256)
The text was updated successfully, but these errors were encountered: