diff --git a/.vscode/settings.json b/.vscode/settings.json index 61172939b09..c5eccd89bcd 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -18,9 +18,9 @@ }, "java.configuration.updateBuildConfiguration": "automatic", // LSP was ooming and it recommended this change - "java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx2G -Xms100m -Xlog:disable", + // (jar) added -Xss8m so lombok would run without stack overflowing + "java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx2G -Xms100m -Xlog:disable -Xss8m", "java.test.config": { "vmargs": [ "-Dstripe.disallowGlobalResponseGetterFallback=true"] - - } + }, } diff --git a/build.gradle b/build.gradle index 78270a302b8..7e6fb00685f 100644 --- a/build.gradle +++ b/build.gradle @@ -164,3 +164,23 @@ jacoco // test code instrumentation for Java 18 toolVersion = "0.8.8" } + + +// Used when developing in vscode-java; some of our examples use +// com.sun.net.httpserver. This is safe to do because the JDK +// team has committed to ensuring jdk.httpserver is exported. +// See https://openjdk.org/jeps/403, "Exported com.sun APIs" +import org.gradle.plugins.ide.eclipse.model.AccessRule + +apply plugin: 'eclipse' + +eclipse { + classpath { + file { + whenMerged { + def jre = entries.find { it.path.contains 'org.eclipse.jdt.launching.JRE_CONTAINER' } + jre.accessRules.add(new AccessRule('0', 'com/sun/net/httpserver/**')) + } + } + } +}