Skip to content

Commit

Permalink
cel-standalone: do not include Jackson (#482)
Browse files Browse the repository at this point in the history
Relocating Jackson can cause stack-overflow exception, as seen in [this check run](https://github.com/projectnessie/nessie/actions/runs/6934341817/job/18862247196?pr=7738).
  • Loading branch information
snazy authored Nov 21, 2023
1 parent 682ba36 commit ad26d66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,13 @@ dependencies {
## Dependency-free artifact

The `org.projectnessie.cel:cel-standalone` contains everything from CEL-Java and has no dependencies.
It comes with relocated dependencies.
It comes with relocated protobuf dependencies.

Using `cel-standalone` is especially useful when your project requires different versions of
`protobuf-java`.

If you need CEL-Java's Jackson functionality, include the Jackson dependencies in your project.

Use _either_ `cel-tools` _or_ `cel-standalone` - never both!

## Motivation to have a CEL-Java port
Expand Down
12 changes: 0 additions & 12 deletions standalone/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,12 @@ dependencies {

compileOnly(libs.protobuf.java)
compileOnly(libs.agrona)

compileOnly(platform(libs.jackson.bom))
compileOnly("com.fasterxml.jackson.core:jackson-databind")
compileOnly("com.fasterxml.jackson.core:jackson-core")
compileOnly("com.fasterxml.jackson.dataformat:jackson-dataformat-protobuf")
compileOnly("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml")
}

val shadowJar = tasks.named<ShadowJar>("shadowJar")

shadowJar.configure {
relocate("com.google.protobuf", "org.projectnessie.cel.relocated.protobuf")
relocate("com.fasterxml.jackson", "org.projectnessie.cel.relocated.jackson")
relocate("org.agrona", "org.projectnessie.cel.relocated.agrona")
manifest {
attributes["Specification-Title"] = "Common-Expression-Language - dependency-free CEL"
Expand All @@ -58,11 +51,6 @@ shadowJar.configure {
include(project(":cel-generated-antlr"))

include(dependency(libs.protobuf.java.get()))
include(dependency("com.fasterxml.jackson.core:jackson-databind"))
include(dependency("com.fasterxml.jackson.core:jackson-core"))
include(dependency("com.fasterxml.jackson.core:jackson-annotations"))
include(dependency("com.fasterxml.jackson.dataformat:jackson-dataformat-protobuf"))
include(dependency("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml"))
include(dependency(libs.agrona.get()))
}
}
Expand Down

0 comments on commit ad26d66

Please sign in to comment.