Skip to content

Fix Phoenix connector compilation in IntelliJ#13227

Merged
findepi merged 1 commit intotrinodb:masterfrom
findepi:findepi/fix-phoenix-connector-compilation-in-intellij-494adf
Jul 20, 2022
Merged

Fix Phoenix connector compilation in IntelliJ#13227
findepi merged 1 commit intotrinodb:masterfrom
findepi:findepi/fix-phoenix-connector-compilation-in-intellij-494adf

Conversation

@findepi
Copy link
Member

@findepi findepi commented Jul 19, 2022

IntelliJ doesn't seem to support multi-module projects when a module
being dependent on is built with shading.

As a workaround, add original dependency to compile-time classpath, but
exclude it from final build. This let's IntelliJ compile the project,
while still keeping the patched & shaded library as the runtime
dependency.

Alternatively we could move trino-phoenix5-patched module to a
separate repo. Not doing this in hope this is a temporary workaround
only.

IntelliJ doesn't seem to support multi-module projects when a module
being dependent on is built with shading.

As a workaround, add original dependency to compile-time classpath, but
exclude it from final build. This let's IntelliJ compile the project,
while still keeping the patched & shaded library as the runtime
dependency.

Alternatively we could move `trino-phoenix5-patched` module to a
separate repo. Not doing this in hope this is a temporary workaround
only.
@cla-bot cla-bot bot added the cla-signed label Jul 19, 2022
@findepi
Copy link
Member Author

findepi commented Jul 19, 2022

This seems to fix the compilation.
Wonder whether this will let us pass the tests too. (The test classpath may be wrong)

@martint
Copy link
Member

martint commented Jul 19, 2022

Not doing this in hope this is a temporary workaround
only.

Yeah, this is just a temporary workaround until the next release of Phoenix goes out. They said it would be fairly soon.

@electrum
Copy link
Member

This IntelliJ shading limitation is why Hadoop and Hive shadings are in separate modules.

@findepi
Copy link
Member Author

findepi commented Jul 20, 2022

This IntelliJ shading limitation is why Hadoop and Hive shadings are in separate modules.

Correct

Yeah, this is just a temporary workaround until the next release of Phoenix goes out. They said it would be fairly soon.

Correct, we're operating under the assumption this is temporary.

@findepi findepi merged commit 8112491 into trinodb:master Jul 20, 2022
@findepi findepi deleted the findepi/fix-phoenix-connector-compilation-in-intellij-494adf branch July 20, 2022 15:07
@github-actions github-actions bot added this to the 391 milestone Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

6 participants