Skip to content

Commit c3916c2

Browse files
committed
Mark SharedLayerSnapshotCapnProtoSchemaHolder as HOSTED_ONLY.
1 parent 275b0d9 commit c3916c2

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

substratevm/mx.substratevm/mx_substratevm.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2543,14 +2543,24 @@ def capnp_compile(args):
25432543
* or visit www.oracle.com if you need additional information or have any
25442544
* questions.
25452545
*/
2546-
//@formatter:off
2547-
//Checkstyle: stop
2548-
// Generated via:
2549-
// $ mx capnp-compile
2546+
// @formatter:off
2547+
// Checkstyle: stop
25502548
""")
25512549
for line in lines:
25522550
if line.startswith("public final class "):
2553-
f.write('@SuppressWarnings("all")\n')
2551+
f.write(
2552+
"""import org.graalvm.nativeimage.Platform;
2553+
import org.graalvm.nativeimage.Platforms;
2554+
2555+
/**
2556+
* This class contains the methods used by the Native Image Layers feature to communicate with the Cap'n Proto Java runtime.
2557+
* The Native Image Layers feature uses Cap'n Proto to serialize and deserialize metadata between layered build processes.
2558+
* This file is generated from the {@code SharedLayerSnapshotCapnProtoSchema.capnp} schema file using {@code mx capnp-compile}
2559+
* and should not be modified manually.
2560+
*/
2561+
@Platforms(Platform.HOSTED_ONLY.class)
2562+
@SuppressWarnings("all")
2563+
""")
25542564
if 'public static final class Schemas {' in line:
25552565
break
25562566
# Replace org.capnproto with com.oracle.svm.shaded.org.capnproto in generated code

substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/imagelayer/SharedLayerSnapshotCapnProtoSchemaHolder.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,23 @@
2222
* or visit www.oracle.com if you need additional information or have any
2323
* questions.
2424
*/
25-
//@formatter:off
26-
//Checkstyle: stop
27-
// Generated via:
28-
// $ mx capnp-compile
25+
// @formatter:off
26+
// Checkstyle: stop
2927
// Generated by Cap'n Proto compiler, DO NOT EDIT
3028
// source: SharedLayerSnapshotCapnProtoSchema.capnp
3129

3230
package com.oracle.svm.hosted.imagelayer;
3331

32+
import org.graalvm.nativeimage.Platform;
33+
import org.graalvm.nativeimage.Platforms;
34+
35+
/**
36+
* This class contains the methods used by the Native Image Layers feature to communicate with the Cap'n Proto Java runtime.
37+
* The Native Image Layers feature uses Cap'n Proto to serialize and deserialize metadata between layered build processes.
38+
* This file is generated from the {@code SharedLayerSnapshotCapnProtoSchema.capnp} schema file using {@code mx capnp-compile}
39+
* and should not be modified manually.
40+
*/
41+
@Platforms(Platform.HOSTED_ONLY.class)
3442
@SuppressWarnings("all")
3543
public final class SharedLayerSnapshotCapnProtoSchemaHolder {
3644
public static class PersistedAnalysisType {

0 commit comments

Comments
 (0)