Skip to content
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

libg SortedList Java 8 issue #1327

Closed
wltjr opened this issue Feb 19, 2016 · 4 comments
Closed

libg SortedList Java 8 issue #1327

wltjr opened this issue Feb 19, 2016 · 4 comments

Comments

@wltjr
Copy link

wltjr commented Feb 19, 2016

I checked in master and current 3.2.0-DEV tag, both still have this issue, Java 8 specific.

In aQute.libg

src/aQute/lib/collections/SortedList.java:21: error: class SortedList inherits unrelated defaults for spliterator() from types SortedSet and List
public class SortedList implements SortedSet, List {
^
where T is a type-variable:
T extends Object declared in class SortedList

Possible solution is mentioned here
http://stackoverflow.com/questions/22746948/class-inherits-unrelated-defaults-for-spliterator-from-types-java-util-set-and

Might need to use one within the class rather than implementing both. I will leave it to others to decide how to resolve.

@bjhargrave
Copy link
Member

This is a source compatibility issue; not a binary compatibility issue.

The aQute.libg project is built to target Java 6 since some other bnd projects which depend up on aQute.libg also target Java 6.

Since the aQute.libg project targets Java 6, we cannot change the source code to override the spliterator method since the Spliterator return type does not exist in Java 6.

So you will either need to compile the aQute.libg source code to target Java 6 or you will need to make a local change to address this source compatibility issue if you still wish to compile the code to target Java 8.

Closing this issue since it will be very obvious whenever we update the aQute.libg project to target Java 8 (or later).

@wltjr
Copy link
Author

wltjr commented Feb 19, 2016

Ok no problem, I will just leave as is with an older target. It compiles fine with 1.7, I was just trying to move as much stuff to 1.8 as possible. Due to another issue on gentoo, source/target is 1.7 with 1.8 jdk, but not setting the bootclasspath to 1.7 rt.jar, so could cause some other issues.

Is there anything I should look for to not file such things if I encounter them? Seems other aspects are updated for Java 8 like -> 64d3af0 Which you pointed out to me, and is in libg as well. :)

I thought this was along the same line.

@bjhargrave
Copy link
Member

If we can make a source change that will work in the current build and support Java 8, that would be good to make. But I think we have done most all of those we can as we currently test build with Java 8 regularly: https://github.com/bndtools/bnd/blob/master/.travis.yml#L7 and https://github.com/bndtools/bnd/blob/master/appveyor.yml#L8.

But we can't make source changes that will not work in the current build as this issue suggested.

@wltjr
Copy link
Author

wltjr commented Feb 19, 2016

Sure I understand. It was the only issue with libg and Java 8. The only one that cannot be addressed yet. :)

Boskovits added a commit to Boskovits/guix that referenced this issue Dec 18, 2017
* gnu/packages/java.scm (java-aqute-libg)[arguments]: Add keyword make-flags to use
  source and target 1.7.

This is an issue know upstream:
bndtools/bnd#1327

It is closed as won't fix.
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

No branches or pull requests

2 participants