Skip to content

Commit a401687

Browse files
committed
Make options stable.
1 parent c1fc6fb commit a401687

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

runJsWithCoverage.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
$JAVA_HOME/bin/js \
44
--jvm \
55
--vm.Dtruffle.class.path.append=target/simpletool-19.0.2-SNAPSHOT.jar \
6-
--experimental-options \
7-
--simple-code-coverage.Enable=true \
6+
--simple-code-coverage \
87
src/test/java/com/oracle/simpletool/test/test.js

src/main/java/com/oracle/simpletool/CLI.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
import com.oracle.truffle.api.Option;
44
import org.graalvm.options.OptionCategory;
55
import org.graalvm.options.OptionKey;
6+
import org.graalvm.options.OptionStability;
67

78
@Option.Group(SimpleCodeCoverageInstrument.ID)
89
public class CLI {
910

10-
@Option(name = "Enable", help = "Enable Simple Coverage (default: false).", category = OptionCategory.USER)
11+
@Option(name = "", help = "Enable Simple Coverage (default: false).", category = OptionCategory.USER, stability = OptionStability.STABLE)
1112
static final OptionKey<Boolean> ENABLED = new OptionKey<>(false);
1213

13-
@Option(name = "PrintCoverage", help = "Print coverage to stdout on process exit (default: true).", category = OptionCategory.USER)
14+
@Option(name = "PrintCoverage", help = "Print coverage to stdout on process exit (default: true).", category = OptionCategory.USER, stability = OptionStability.STABLE)
1415
static final OptionKey<Boolean> PRINT_COVERAGE = new OptionKey<>(true);
1516
}

src/test/java/com/oracle/simpletool/test/SimpleCodeCoverageInstrumentTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ public class SimpleCodeCoverageInstrumentTest {
2323
public void exampleTest() throws IOException {
2424
// This is how we can create a context with our tool enabled if we are embeddined in java
2525
try (Context context = Context.newBuilder("js")
26-
.option(SimpleCodeCoverageInstrument.ID + ".Enable", "true")
26+
.option(SimpleCodeCoverageInstrument.ID, "true")
2727
.option(SimpleCodeCoverageInstrument.ID + ".PrintCoverage", "false")
28-
.allowExperimentalOptions(true)
2928
.build()) {
3029
Source source = Source.newBuilder("js", new File("src/test/java/com/oracle/simpletool/test/test.js")).build();
3130
context.eval(source);

0 commit comments

Comments
 (0)