Skip to content

Commit fb3434b

Browse files
chore: remove @VerbName
fixes: #4640
1 parent bcffdad commit fb3434b

File tree

6 files changed

+10
-22
lines changed

6 files changed

+10
-22
lines changed

backend/runner/pubsub/testdata/kotlin/subscriber/src/main/kotlin/xyz/block/ftl/java/test/subscriber/Subscriber.kt

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ class Subscriber {
2929
}
3030

3131
@Verb
32-
@VerbName("catch")
3332
fun catchVerb(req: CatchRequest<PubSubEvent?>) {
3433
if (!req.error.contains("always error: event")) {
3534
throw RuntimeException("unexpected error: " + req.error)

examples/java/time/pom.xml

+7
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,11 @@
1111
<version>1.0-SNAPSHOT</version>
1212
</parent>
1313

14+
<dependencies>
15+
<dependency>
16+
<groupId>io.quarkus</groupId>
17+
<artifactId>quarkus-jdbc-mysql</artifactId>
18+
</dependency>
19+
</dependencies>
20+
1421
</project>

examples/java/time/src/main/java/ftl/time/Time.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@
33
import java.time.OffsetDateTime;
44

55
import xyz.block.ftl.Export;
6+
import xyz.block.ftl.SQLDatabaseType;
7+
import xyz.block.ftl.SQLDatasource;
68
import xyz.block.ftl.Verb;
79

10+
@SQLDatasource(name = "test", type = SQLDatabaseType.MYSQL)
811
public class Time {
912

1013
@Verb
11-
@Export
1214
public TimeResponse time() {
1315
return new TimeResponse(OffsetDateTime.now().plusDays(1));
1416
}
1517

1618
@Verb
17-
@Export
1819
public TimeResponse time2() {
1920
return new TimeResponse(OffsetDateTime.now().plusDays(3));
2021
}

jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/ModuleBuilder.java

-4
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
import xyz.block.ftl.Config;
4545
import xyz.block.ftl.LeaseClient;
4646
import xyz.block.ftl.Secret;
47-
import xyz.block.ftl.VerbName;
4847
import xyz.block.ftl.language.v1.Error;
4948
import xyz.block.ftl.language.v1.ErrorList;
5049
import xyz.block.ftl.runtime.FTLRecorder;
@@ -122,9 +121,6 @@ public ModuleBuilder(IndexView index, String moduleName, Map<DotName, TopicsBuil
122121
}
123122

124123
public static @NotNull String methodToName(MethodInfo method) {
125-
if (method.hasAnnotation(VerbName.class)) {
126-
return method.annotation(VerbName.class).value().asString();
127-
}
128124
return method.name();
129125
}
130126

jvm-runtime/ftl-runtime/common/runtime/src/main/java/xyz/block/ftl/VerbName.java

-12
This file was deleted.

jvm-runtime/ftl-runtime/common/runtime/src/main/java/xyz/block/ftl/runtime/processor/AnnotationProcessor.java

-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import xyz.block.ftl.Secret;
3737
import xyz.block.ftl.TypeAlias;
3838
import xyz.block.ftl.Verb;
39-
import xyz.block.ftl.VerbName;
4039

4140
/**
4241
* POC annotation processor for capturing JavaDoc, this needs a lot more work.
@@ -89,8 +88,6 @@ public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment
8988
String name;
9089
if (element.getAnnotation(TypeAlias.class) != null) {
9190
name = element.getAnnotation(TypeAlias.class).name();
92-
} else if (element.getAnnotation(VerbName.class) != null) {
93-
name = element.getAnnotation(VerbName.class).value();
9491
} else {
9592
name = element.getSimpleName().toString();
9693
}

0 commit comments

Comments
 (0)