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

Truffle no longer needs the java.class.path sysprop #43555

Merged
merged 2 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
* This system property is used in rare by libraries (Truffle for example) to create their own ClassLoaders.
* The value of the system property is simply best effort, as there is no way to faithfully represent
* the Quarkus ClassLoader hierarchies in a system property value.
*
* @deprecated This was initially added to support Truffle, but it is no longer needed so the build item should not be used
*/
@Deprecated(forRemoval = true)
public final class SetClassPathSystemPropBuildItem extends MultiBuildItem {
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import java.util.List;
import java.util.stream.Stream;

import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.annotations.ExecutionTime;
import io.quarkus.deployment.annotations.Record;
Expand All @@ -15,17 +14,9 @@
import io.quarkus.maven.dependency.ResolvedDependency;
import io.quarkus.runtime.ClassPathSystemPropertyRecorder;

@SuppressWarnings("removal")
public class ClassPathSystemPropBuildStep {

@BuildStep
public void produce(BuildProducer<SetClassPathSystemPropBuildItem> producer, CurateOutcomeBuildItem curateOutcome) {
boolean truffleUsed = curateOutcome.getApplicationModel().getDependencies().stream()
.anyMatch(d -> d.getGroupId().equals("org.graalvm.polyglot"));
if (truffleUsed) {
producer.produce(new SetClassPathSystemPropBuildItem());
geoand marked this conversation as resolved.
Show resolved Hide resolved
}
}

@BuildStep
@Record(ExecutionTime.STATIC_INIT)
public void set(List<SetClassPathSystemPropBuildItem> setCPItems,
Expand Down
Loading