Skip to content

Commit 7058067

Browse files
committed
feat: add hatch for opt-in experimental types
Signed-off-by: Sam Gammon <sam@elide.dev>
1 parent 5c395d2 commit 7058067

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

pkl-commons/api/pkl-commons.api

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ public final class org/pkl/commons/UrisKt {
3131
public static final fun toPath (Ljava/net/URI;)Ljava/nio/file/Path;
3232
}
3333

34+
public abstract interface annotation class org/pkl/commons/annotations/PklExperimental : java/lang/annotation/Annotation {
35+
}
36+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package org.pkl.commons.annotations
17+
18+
/**
19+
* Marks experimental APIs in Kotlin or Java. Such APIs may be publicly exposed by the Pkl project,
20+
* but are not provided with a stability guarantee, and require opt-in use from Kotlin.
21+
*/
22+
@RequiresOptIn(level = RequiresOptIn.Level.WARNING)
23+
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY)
24+
@Retention(AnnotationRetention.BINARY)
25+
annotation class PklExperimental

0 commit comments

Comments
 (0)