gradle-node-plugin icon indicating copy to clipboard operation
gradle-node-plugin copied to clipboard

Dependent plugin incompatibility when upgrading to 3.x

Open pun-ky opened this issue 4 years ago • 3 comments

Hey! Thx for the updates in 3.x.

However, now I see the problem when I am trying to upgrade Gradle Lighthouse Plugin which I am maintaining. Previously I was able to instantiate YarnExecRunner by myself to be able to execute it multiple times within single task execution (just using YarnTask does not make it possible). Right now due to internal here - https://github.com/wttech/gradle-lighthouse-plugin/blob/master/src/main/kotlin/com/cognifide/gradle/lighthouse/runner/Runner.kt#L53 I am not able to instantiate it.

Could you consider not having internal here to unblock me in upgrading my plugin? Could you release it after making the change?

pun-ky avatar Nov 24 '21 10:11 pun-ky

my problem is conceptually similar to https://github.com/node-gradle/gradle-node-plugin/pull/202

pun-ky avatar Nov 24 '21 10:11 pun-ky

YarnExecRunner is on the list of things to be opened, but I've had limited time and not been able to work through all of it yet

The work is being tracked in #190, but if you could confirm if you need any of the private functions in YarnExecRunner that'd be great and speed up the work :-) I think the API has changed a bit now that it's abstract, one easy way to test would be to clone the branch from #202, open up YarnExecRunner and see if your plugins builds using a composite build

deepy avatar Dec 07 '21 11:12 deepy

@pun-ky I've looked at lighthouse/runner/Runner.kt#L55 and the API has changed from 2.x

You probably want to do pretty much the same thing as YarnTask's exec method.

I haven't thought all too much about the API, but I don't think the FooExecs will go all the way to open, they'll be public and the way to go is probably changing what they're given, in your case I think that'll just setting the values of NodeExecConfiguration is good enough, but for others I suspect extending the VariantComputer will be good enough

deepy avatar Dec 09 '21 19:12 deepy