Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

jeremyrsmith
Copy link
Contributor

Resolves a compiletime/runtime mismatch when Spark is in user classpath

Resolves a compiletime/runtime mismatch when Spark is in user classpath
build.sbt Outdated
"com.github.javaparser" % "javaparser-symbol-solver-core" % versions.javaparser,
"org.scalamock" %% "scalamock" % "4.4.0" % "test"
),
dependencyOverrides += "com.chuusai" %% "shapeless" % "2.3.2",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to pick a specific version based on what matches Spark?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I think so. I wish there were a way to tell sbt, "use the version that you get from Spark, not a later version" but there isn't as far as I know.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no like "provided" dependency? compileOnly or whatever?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is provided... but I don't see how that would solve this issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, by "compiletime/runtime" I mean cell compile time and cell runtime. The issue is that the shapeless in polynote-kernel-assembly (which needs to be there in the absence of Spark) gets used during compile time for some reason, and its macros are what get executed. But during runtime, Spark's shapeless gets used, which doesn't have the code that the macro referred to.

@jeremyrsmith jeremyrsmith merged commit cee32f9 into master Nov 14, 2024
3 checks passed
@jeremyrsmith jeremyrsmith deleted the override-shapeless-version branch November 14, 2024 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants