-
Notifications
You must be signed in to change notification settings - Fork 888
JAVA-3045 Fix GraalVM native image support for GraalVM 22.2 #1612
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,9 @@ | |
| */ | ||
| package com.datastax.oss.driver.internal.core.util; | ||
|
|
||
| import com.datastax.oss.driver.shaded.guava.common.collect.ImmutableList; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't we add a comment somewhere to warn future maintainers that this class should be extra careful when importing anything outside of the standard library?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So... I'm a little torn on this, frankly. I'd feel better about saying something like this if I understood more cleanly why the change in question resulted in the behaviour we saw. But it seems to be the case that introducing a dependency upon a shaded class somehow:
I... just don't know if I have enough there to extract some kind of meaningful guidance. We've already seen that changes between Graal versions can have odd impacts on what was perfectly valid code. This seems like another one of those, but I just don't see a way to draw a lesson from that which can be clearly stated and apply to future use. I'm open to suggestions if anybody has any. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah pretty hard to anticipate this kind of behavior change, I would vote for no specific comment but up to you. |
||
| import java.util.Arrays; | ||
| import java.util.Collections; | ||
| import java.util.List; | ||
|
|
||
| /** | ||
| * A set of driver optional dependencies and a common mechanism to test the presence of such | ||
|
|
@@ -48,10 +50,10 @@ public enum Dependency { | |
| ; | ||
|
|
||
| @SuppressWarnings("ImmutableEnumChecker") | ||
| private final ImmutableList<String> clzs; | ||
| private final List<String> clzs; | ||
|
|
||
| Dependency(String... classNames) { | ||
| clzs = ImmutableList.copyOf(classNames); | ||
| clzs = Collections.unmodifiableList(Arrays.asList(classNames)); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A proxy for immutable lists without the type information. Probably not strictly necessary (there's no obvious way for these lists to change) but it provides information that these values shouldn't change. |
||
| } | ||
|
|
||
| public Iterable<String> classes() { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.