Skip to content

Allow dependencies with scopes other than "compile" on the transpiler classpath#61

Open
EricWittmann wants to merge 1 commit into
lgrignon:masterfrom
EricWittmann:fix/dependency-scopes
Open

Allow dependencies with scopes other than "compile" on the transpiler classpath#61
EricWittmann wants to merge 1 commit into
lgrignon:masterfrom
EricWittmann:fix/dependency-scopes

Conversation

@EricWittmann
Copy link
Copy Markdown

Added a config param to allow non-compile scoped dependencies on the classpath for the jsweet mojos

My use-case is that I have a standalone library that is built and deployed as both Java and JavaScript. JSweet is used for transpilation, with standard JS tools in the build pipeline to produce a JS library to be deployed to npmjs. However, the Java library itself is also built and published to maven central. I don't want the JSweet dependencies as transitive deps on my Java library, since they are only needed for transpilation. However, I have a JSweet extension, which fails to compile without the JSweet dependencies. Currently the only way to get the JSweet dependencies on the transpiler classpath is to have them as compile dependencies of the project.

This PR adds a new Mojo parameter that allows overriding that default - the config now allows whatever scopes you want to be included.

It also improves the logging output to indicate why a dependency is excluded and fixes a compile problem on some JVMs with the non static usage of Thread.yield.

@kohlschuetter
Copy link
Copy Markdown
Contributor

I just noticed your pull requests here, which overlaps with one I just made:
#65

Do you think we need to make these scopes configurable, or can we just assume that any scopes not explicitly marked for runtime/test/import should be permitted?

Moreover, I made another PR with the change to "yield()" included in your PR as well, which is an unrelated problem that we should just fix regardless of this.
#66

@kohlschuetter
Copy link
Copy Markdown
Contributor

Superseded by #65 and #66?

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