Skip to content

Commit 723fff1

Browse files
authored
Merge pull request #46 from diffblue/pcrane/feature/intestsusellm-experimental-annotation
Add an `@InTestsUseLLM` experimental annotation
2 parents e5ca827 + 502f727 commit 723fff1

File tree

3 files changed

+58
-4
lines changed

3 files changed

+58
-4
lines changed

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ For installation into a Maven project the `provided` scope is recommended so tha
2424
<dependency>
2525
<groupId>com.diffblue.cover</groupId>
2626
<artifactId>cover-annotations</artifactId>
27-
<version>1.7.0</version>
27+
<version>1.8.0</version>
2828
<scope>provided</scope>
2929
</dependency>
3030
</dependencies>
@@ -36,9 +36,9 @@ For installation into a Gradle project the `compileOnly` and `testImplementation
3636

3737
```
3838
dependencies {
39-
compileOnly("com.diffblue.cover:cover-annotations:1.7.0")
39+
compileOnly("com.diffblue.cover:cover-annotations:1.8.0")
4040
41-
testImplementation("com.diffblue.cover:cover-annotations:1.7.0")
41+
testImplementation("com.diffblue.cover:cover-annotations:1.8.0")
4242
}
4343
```
4444

@@ -343,3 +343,17 @@ public class CarPainter {
343343
}
344344
```
345345

346+
### Experimental Annotations
347+
348+
Experimental annotations should not be used in a production setting, but are
349+
included to allow Diffblue to perform experiments with new features.
350+
351+
> [!NOTE]
352+
> The annotations in the `experimental` package can change at any time.
353+
>
354+
> Do not rely on them in production code!
355+
356+
#### Using `@InTestsUseLLM`
357+
358+
Indicates that LLMs can be used in this context.
359+

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<modelVersion>4.0.0</modelVersion>
1717
<groupId>com.diffblue.cover</groupId>
1818
<artifactId>cover-annotations</artifactId>
19-
<version>1.7.0</version>
19+
<version>1.8.0</version>
2020
<packaging>jar</packaging>
2121

2222
<name>Cover Annotations</name>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright 2025 Diffblue Limited.
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+
* A copy of the License is located at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
package com.diffblue.cover.annotations.experimental;
16+
17+
import static java.lang.annotation.ElementType.METHOD;
18+
import static java.lang.annotation.ElementType.PACKAGE;
19+
import static java.lang.annotation.ElementType.PARAMETER;
20+
import static java.lang.annotation.ElementType.TYPE;
21+
import static java.lang.annotation.RetentionPolicy.RUNTIME;
22+
23+
import java.lang.annotation.Retention;
24+
import java.lang.annotation.Target;
25+
26+
/**
27+
* Indicates the annotated element can request assistance from LLMs.
28+
*
29+
* <p>The specific assistance will depend on: the element, what features Diffblue Cover has
30+
* implemented, and any number of other things.
31+
*
32+
* <p><em>Note:</em> this annotation may change in the future without further warning.
33+
*
34+
* @deprecated This annotation is experimental and may change or be removed in future releases. Its
35+
* use is discouraged except for internal experimental purposes.
36+
*/
37+
@Retention(RUNTIME)
38+
@Target({PACKAGE, TYPE, METHOD, PARAMETER})
39+
@Deprecated
40+
public @interface InTestsUseLLM {}

0 commit comments

Comments
 (0)