on 0.22
code.quarkus.io with resteasy,resteasy-jsonb,panache,postgresql,openapi,validator@Path("/api")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public class TodoResource {
@GET
public List<Todo> getAll() {
return Todo.listAll();
}
}
@Entity
public class Todo extends PanacheEntity {
public String title;
}
# set DB
quarkus.datasource.url=jdbc:postgresql:quarkus-demo
quarkus.datasource.driver=org.postgresql.Driver
quarkus.datasource.username=quarkus-demo
quarkus.datasource.password=quarkus-demo
# Hibernate details
quarkus.hibernate-orm.database.generation=drop-and-create
quarkus.hibernate-orm.log.sql=true
ExampleResource.java but application.properties2019-09-17 07:07:00,034 INFO [io.qua.dev] (executor-thread-1) Changed source files detected, recompiling [/Users/emmanuel/Code/quarkus/demos/CodeOne/hibernate-app/src/main/java/io/quarkus/hibernate/ExampleResource.java]
2019-09-17 07:07:00,247 INFO [io.qua.dep.QuarkusAugmentor] (executor-thread-1) Beginning quarkus augmentation
I would love for this exact scenario to be tested in unit tests because it has broken numnerous times in the past.
@emmanuelbernard you can share the link to the generated app.
I think a tiny url feature would be great 馃槄
I confirm that doing the same app with
mvn io.quarkus:quarkus-maven-plugin:0.21.2:create
mvn quarkus:add-extension -Dextensions=jdbc-postgresql,hibernate-orm-panache,hibernate-validator,resteasy-jsonb,openapi
Work as expected so it's either a bug from the code.quarkus.io generator or Quarkus 0.22 or a combination of both.
BTW I don't understand why code. generates ExampleResource while the mvn pluging generates HelloResource,
@ia3andy No time, I'm trying to salvage my demos for CodeOne
As @gsmet guessed my files have a modified date in the future which must be screwing up things
So I'm on macOS and use the code.quarkus.io in SFO. if that helps on the date problem and use the macOS native archive opener
FWIW, the date issue is reproducible on a plain Fedora 30 so I think it's a general issue.
This issue has been reproduced and seems to be due to the zip creation in Code Quarkus. I filed an issue there: https://github.com/quarkusio/code.quarkus.io/issues/152
Let's keep that issue open until we actually have a fix.
It's now fixed on code.quarkus.io
I think as @maxandersen suggested, maybe it would be better to check the (risky?) files dates at build/runtime?
Is it really fixed in the macOS archiver case in the end?
Is it really fixed in the macOS archiver case in the end?
@emmanuelbernard no it still bug, I'll create a new fix with a fixed date in the past (probably build date UTC - 12h).
As discusses with @dmlloyd and @stuartwdouglas, in parallel, a fix in the quarkus dev watch algo seems important too. They suggested using date offset from the file dates.
As discusses with @dmlloyd and @stuartwdouglas, in parallel, a fix in the quarkus dev watch algo seems important too. They suggested using date offset from the file dates.
Not date offset: rather, record the dates for each file and compare to see if they've changed (in any way). Don't do arithmetic of any kind on filesystem dates/timestamps or dates/timestamps returned by the JVM - such operations are inherently unreliable in the face of DST, NTP, human error, etc. Just see if it's different or not different than it was before.
Most helpful comment
Not date offset: rather, record the dates for each file and compare to see if they've changed (in any way). Don't do arithmetic of any kind on filesystem dates/timestamps or dates/timestamps returned by the JVM - such operations are inherently unreliable in the face of DST, NTP, human error, etc. Just see if it's different or not different than it was before.