Open anton-tregubov opened 6 years ago
Last time I looked into this, I spent a little time and then concluded:
This is looking nontrivial, since our RangeSet implementations rely on our other NavigableSet implementations, which we haven't yet made available under GWT.
It would be nice to do someday, but I wouldn't expect it to become a priority, sorry :(
https://github.com/google/guava/blob/master/guava/src/com/google/common/collect/TreeRangeSet.java Use only NavigableMap.
I actually don't understand your point about NavigableSet. And even if we accept fact that there are some guava implementations that are not available under GWT, i think this classes are marked with @ GwtIncompatible and unavailable with or without fixed TreeRangeSet.
Sorry, you're right, NavigableMap
, not NavigableSet
.
That includes AbstractNavigableMap
and its dependencies, including DescendingMap
and NavigableKeySet
.
@cpovirk Can i send a PR for the changes if any required?
This has turned out to look more complicated than we'd hoped, but we could take a patch if you get it working.
@cpovirk I agree with @anton-tregubov - there doesn't seem to be any good reason why the RangeSet
interface is marked @GwtIncompatible
. I can accept that you can't make your TreeRangeSet
class compatible (though I don't understand why), but making the interface @GwtIncompatible
needlessly prevents users from writing their own implementation that is compatible.
@GwtIncompatible("uses NavigableMap") public class TreeRangeSet
That means that users with GWT 2.7.0+(https://github.com/gwtproject/gwt/issues/4236) unable to use TreeRangeSet even NavigableMap was supported in this version. Problem root cause is that all annotated files with GwtIncompatible are skip sources packaging in guava-gwt.
Please remove it or describe why it's not possible.
Also maybe you know easy WA to make TreeRangeSet usable in guava 18.0?