Skip to content

Commit 6572124

Browse files
author
Christian Wimmer
committed
Rename TolerateBuilderClassesOnImageClasspath to AllowDreprecatedBuilderClassesOnImageClasspath
1 parent 3e85c5c commit 6572124

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

java-benchmarks/mx.java-benchmarks/mx_java_benchmarks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ def extra_image_build_argument(self, benchmark, args):
371371
'-H:EnableURLProtocols=http',
372372
'-H:NativeLinkerOption=-no-pie',
373373
'-H:-UseServiceLoaderFeature',
374-
'-H:+TolerateBuilderClassesOnImageClasspath', # needs to be removed once GR-41746 is fixed
374+
'-H:+AllowDeprecatedBuilderClassesOnImageClasspath', # needs to be removed once GR-41746 is fixed
375375
'--add-exports=org.graalvm.sdk/org.graalvm.nativeimage.impl=ALL-UNNAMED',
376376
'--add-exports=org.graalvm.nativeimage.base/com.oracle.svm.util=ALL-UNNAMED',
377377
'--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.configure=ALL-UNNAMED',

substratevm/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This changelog summarizes major changes to GraalVM Native Image.
44

55
## Version 23.0.0
6-
* (GR-40187) Report invalid use of SVM specific classes on image class- or module-path as error. As a temporary workaround, -H:+TolerateBuilderClassesOnImageClasspath allows turning the error into a warning.
6+
* (GR-40187) Report invalid use of SVM specific classes on image class- or module-path as error. As a temporary workaround, `-H:+AllowDeprecatedBuilderClassesOnImageClasspath` allows turning the error into a warning.
77
* (GR-41196) Provide `.debug.svm.imagebuild.*` sections that contain build options and properties used in the build of the image.
88
* (GR-41978) Disallow `--initialize-at-build-time` without arguments. As a temporary workaround, `-H:+AllowDeprecatedInitializeAllClassesAtBuildTime` allows turning this error into a warning.
99

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/SubstrateOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,6 @@ public Boolean getValueOrDefault(UnmodifiableEconomicMap<OptionKey<?>, Object> v
858858
};
859859

860860
@Option(help = "Instead of abort, only warn if image builder classes are found on the image class-path.", type = Debug)//
861-
public static final HostedOptionKey<Boolean> TolerateBuilderClassesOnImageClasspath = new HostedOptionKey<>(false);
861+
public static final HostedOptionKey<Boolean> AllowDeprecatedBuilderClassesOnImageClasspath = new HostedOptionKey<>(false);
862862

863863
}

substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/NativeImageClassLoaderSupport.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ public void reportBuilderClassesInApplication() {
819819
var destinationMap = builderURILocations.contains(classesEntries.getKey()) ? builderClasses : applicationClasses;
820820
destinationMap.put(classesEntries.getKey(), classesEntries.getValue());
821821
}
822-
boolean tolerateViolations = SubstrateOptions.TolerateBuilderClassesOnImageClasspath.getValue(parsedHostedOptions);
822+
boolean tolerateViolations = SubstrateOptions.AllowDeprecatedBuilderClassesOnImageClasspath.getValue(parsedHostedOptions);
823823
MapCursor<URI, EconomicSet<String>> applicationClassesEntries = applicationClasses.getEntries();
824824
while (applicationClassesEntries.advance()) {
825825
var applicationClassContainer = applicationClassesEntries.getKey();
@@ -834,9 +834,9 @@ public void reportBuilderClassesInApplication() {
834834
String errorMessage = String.join(" ", message,
835835
"This can be caused by a fat-jar that illegally includes svm.jar (or graal-sdk.jar) due to its build-time dependency on it.",
836836
"As a temporary workaround, %s allows turning this error into a warning.");
837-
throw UserError.abort(errorMessage, SubstrateOptionsParser.commandArgument(SubstrateOptions.TolerateBuilderClassesOnImageClasspath, "+"));
837+
throw UserError.abort(errorMessage, SubstrateOptionsParser.commandArgument(SubstrateOptions.AllowDeprecatedBuilderClassesOnImageClasspath, "+"));
838838
} else {
839-
System.out.println("Warning: " + message);
839+
System.err.println("Warning: " + message);
840840
}
841841
}
842842
}

0 commit comments

Comments
 (0)