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

Build fails with exposed dependency #13

Closed
xasmx opened this issue Jun 27, 2019 · 6 comments · Fixed by #23
Closed

Build fails with exposed dependency #13

xasmx opened this issue Jun 27, 2019 · 6 comments · Fixed by #23
Assignees
Labels
bug Something isn't working

Comments

@xasmx
Copy link

xasmx commented Jun 27, 2019

Issue:
Trying to build a minimal kotlin project with bazel fails if I include Exposed as a dependency.
If I remove "@maven//:org_jetbrains_exposed_exposed" from the BUILD file, the build will complete successfully.

Environment:
OSX 10.13.6
Bazel Build label: 0.27.0


Build command used and bazel build output:

samis-mbp-2:kot sami$ bazel build exposed:exposed --verbose_failures
INFO: Analyzed target //exposed:exposed (89 packages loaded, 877 targets configured).
INFO: Found 1 target...
ERROR: /Users/sami/dev/quant/kot/exposed/BUILD:5:1: Compiling Kotlin to JVM //exposed:exposed_lib { kt: 1, java: 0, srcjars: 0 } failed (Exit 2): builder failed: error executing command
(cd /private/var/tmp/_bazel_sami/c9b70ca58e43aa08a870ac9e92a6cedc/execroot/main &&
exec env -
LC_CTYPE=en_US.UTF-8
bazel-out/host/bin/external/io_bazel_rules_kotlin/src/main/kotlin/builder '--flagfile=bazel-out/darwin-fastbuild/bin/exposed/exposed_lib.jar-0.params')
Execution platform: @bazel_tools//platforms:host_platform
Target //exposed:exposed failed to build
INFO: Elapsed time: 20.180s, Critical Path: 18.56s
INFO: 17 processes: 13 darwin-sandbox, 4 worker.
FAILED: Build did NOT complete successfully


The minimal project used to replicate the problem:
WORKSPACE.txt
BUILD.txt
Exposed.kt.txt

@xasmx
Copy link
Author

xasmx commented Jun 29, 2019

Looks like this only happens with newer versions of exposed.
If I switch the dependency to "org.jetbrains.exposed:exposed:0.12.2", it works.
But, if I use "org.jetbrains.exposed:exposed:0.13.1" or newer, the build breaks.

@cgruber
Copy link
Owner

cgruber commented Jul 2, 2019

I bumped the whole thing up to be 0.27 compatible (forgot to update the readme). I'll test this out.

@cgruber cgruber self-assigned this Jul 2, 2019
@cgruber cgruber added the bug Something isn't working label Jul 2, 2019
@cgruber
Copy link
Owner

cgruber commented Aug 8, 2019

I've had a real problem trying to get any information out. The compiler itself is erroring with an internal error, but I'm having a struggle exposing the failure information from the compiler, into the build system. I'm going to take another crack at this soon, but with more recent kotlinc and seeing if later versions fix whatever's going wrong. It's a bit of a hail-mary, but I can't seem to see the actual error, just the downstream consequences, and compiler crashes are usually some improper classpath specification, or some other configuration problem, or someting subtle about versions (a dep which uses features not supported in the version of the compiler, but which triggers an edge-case error, etc.)

@puffnfresh
Copy link

I'm getting this with a dependency on org_bouncycastle_bcprov_jdk15on - sucks that we're crashing the Kotlin compiler. @cgruber what's the approach to debugging this?

@puffnfresh
Copy link

puffnfresh commented Sep 17, 2019

  • org.bouncycastle:bcpkix-jdk15on: 1.61 works but 1.62 fails
  • org.apache.logging.log4j:log4j-api: 2.8.2 works but 2.9.0 fails

Very interesting!

cgruber pushed a commit that referenced this issue Sep 24, 2019
Figured this out by looking at the output of the command.

Fixes #13
@cgruber
Copy link
Owner

cgruber commented Sep 24, 2019

Thanks so much for tracking this down and fixing it. I was having real problems reproducing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants