-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle java source/target defined at extension level #188
Conversation
There is an issue about this: #175. I also did some investigation and turns out the copy constructor is not needed for running. I'm thinking that, for debugging purpose, maybe override Update: The copy constructor is required. If we remove all the copy constructor, here: Line 174 in 395b977
The sourceset is a proxy wrapperred type, and it will encounter some problem |
plugin/src/main/java/com/microsoft/java/bs/gradle/plugin/JavaLanguageModelBuilder.java
Outdated
Show resolved
Hide resolved
Shall I leave my changes to |
I think you can leave as it is. Until we find a way to get rid of the copy constructor entirely |
I think we should use AFAIK, there are three different kind of ways to set the source/target level.
The current approach cannot get the version in case 2. While using the Considering |
Hi @Arthurm1, would you like to update the PR? Or do you have any concern about |
@jdneo Will look at it this weekend and probably change the PR |
@Arthurm1 Thank you. My thought is that we can just simply get the source/target level from JavaCompile, no need to inspecting from compile args. (Correct me if this is working for any cases) |
755fdef
to
e686901
Compare
@jdneo I've changed it so that the source/target compatibility is populated purely from the This seems to reflect more how people use the Gradle settings, i.e. set source/target compatibility in |
plugin/src/main/java/com/microsoft/java/bs/gradle/plugin/JavaLanguageModelBuilder.java
Show resolved
Hide resolved
Thank you @Arthurm1 |
This will take into account the
java plugin
source/target compatibility settings.e.g. using...
instead of
I'm not sure if this is enough to fix redhat-developer/vscode-java#3721. The source/target compatibility in
JVMBuildTarget
will have changed but the javac options will still contain--release 8
. Hopefully that will be ok for the eclipse settings.I note that here it says to configure the
compileJava
task with source/target and not thejava
plugin when usingJabel
I've also extended the
POJO
constructor copying used inDefaultSourceSets
to the language extensions. It's not needed for normal running but it's a pain when debugging as all the variables/watches just show the proxy classes.