-
Notifications
You must be signed in to change notification settings - Fork 28
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
GH-264: Xpect files cannot be launched in IDE under Java 9 #265
Conversation
Signed-off-by: Mark-Oliver Reiser <[email protected]>
Signed-off-by: Mark-Oliver Reiser <[email protected]>
Instead of hand-rolling smth, you may want to consider using io.github.classgraph (see eclipse/xtext-extras#433) |
Yes, @cdietrich already mentioned this in the issue. However, he said it's not in the orbit yet. |
It's available in the latest orbit drops. |
Good! But then more changes are required than just my small bug fix. Some existing code needs to be replaced. Also a CQ is needed. I'll have a look. Maybe I can provide something... |
Signed-off-by: Mark-Oliver Reiser <[email protected]>
build green: I'll test this tomorrow with our n4js build. |
Signed-off-by: Mark-Oliver Reiser <[email protected]>
@meysholdt please have a look. Thanks! |
Just to provide some background: The original code if (classLoader instanceof URLClassLoader) {
URLClassLoader ucl = (URLClassLoader) classLoader; from |
@dhuebner since your are currently working on Xpect, you might also wanna have a quick look. Thanks! |
@mor-n4 you should sign off all commits to get the eca validation running (and likely squash the commits into one) |
also https://ci.eclipse.org/xpect/job/Xpect/job/GH-264/lastSuccessfulBuild/artifact/org.eclipse.xpect.releng/p2-repository/target/repository/plugins/ does not seems to contain classgraph |
also somebody with commit rights should file a (piggy back) CQ for classgraph. |
Added here for consistency with how other dependencies are handled. Signed-off-by: Mark-Oliver Reiser <[email protected]>
@mmews-n4 just created the CQ. Thanks! |
@mor-n4 I'm not familiar with the ClassGraph API, but your code replacement looks okay. |
@mor-n4 |
you will pull the new classgraph with Xtext 2.19 anyway. |
Neither do I. That's why I had first implemented a solution without adding a new dependency. See my first commit in this PR. |
Most customer project with Xpect are using Xtext 2.14 and older. So it's not a pro argument to me. |
projects with java 11 wont use Xtext 2.14 |
We don't know whether the one-liner is a fully adequate substitute for the graphclass library, also with regard to all versions of Java 9+ (i.e. 10, 11, 12, 13, and beyond). |
From what I understand, just the Xpect build is configured to pick classgraph from the Orbit. But some customer project using Xpect and updating to a new version of Xpect (that has the dependency to classgraph) could pick classgraph |
no. this is why i proposed it to package it to the update site e.g. |
@mor-n4 I just described my opinion, I'm not reviewing your PR. @meysholdt Will do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this change.
I very much like that idea that the responsibility to correctly list all ClassPath entries is no longer with Xpect. Casting down to the URLClassLoader has always been a hack.
The group of users that wants to migrate to the latest Xpect version and at the same time stick with an old Xtext version will have to adjust their target platform to include the ClassGraph bundle from Orbit. But that's ok, since they as well will benefit from correct classpath scanning and us being able to devote our time to more valuable features.
The group of users that uses the latest version of Xtext won't have migration effort as @cdietrich pointed out...
Xpect could do it in the same way. |
I had already added this when @cdietrich pointed that out the first time. See |
i see maybe add the source too to be consistent |
BTW: if it is true that the original |
yes and no: the question is:
having the full version in target is a thing of targets so that it wont accept it without qualifier whilst eclipse version policy wants the qualifier and maven does not have it |
Signed-off-by: Mark-Oliver Reiser <[email protected]>
Signed-off-by: Mark-Oliver Reiser <[email protected]>
Recent changes:
I guess this concludes the discussion and we will later merge this after fixing the eca checker issues. Thanks everyone for the feedback, esp. @cdietrich for the help! |
Closing this PR; due to problems with eclipse/eca checker it's now replaced by #268 (which contains the exact same changes). |
See #264.