Allow dependencies with scopes other than "compile" on the transpiler classpath#61
Open
EricWittmann wants to merge 1 commit into
Open
Allow dependencies with scopes other than "compile" on the transpiler classpath#61EricWittmann wants to merge 1 commit into
EricWittmann wants to merge 1 commit into
Conversation
…classpath for the jsweet mojos
Contributor
|
I just noticed your pull requests here, which overlaps with one I just made: 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. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a config param to allow non-compile scoped dependencies on the classpath for the jsweet mojosMy 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
compiledependencies 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.