-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Qute-Templates cannot be found in tests if directory "src/test/resources/templates" exist #40366
Comments
/cc @mkouba (qute) |
@aloubyansky Is it expected that It seems to be a regression introduced in 6014d51. We should definitely add a test with templates in the |
Ah, I see, it should be considered a bug. If the path was a file, I think we would pick the first found (like it is right now) but if it's a directory, so the content should be merged I guess. |
Yes, I would expect this behavior. Would you care to send a fix? |
Yes, i'll look into it |
@mkouba i think #40400 should fix it. So the |
I'll add some other API to PathTree to make it more convenient for these use-cases. |
The reproducer works with the linked PR |
In the meantime, Stuart also opened this PR that adds |
Describe the bug
As soon as there is a directory
src/test/resources/templates
, Qute Templates can no longer be found when executing tests, resulting in aNo template matching the path foo/bar could be found for: org.acme.FooTemplates.bar
.For more discussion, see #40158
Expected behavior
The existence of a
src/test/resources/templates
should not break the resolution of the templates.Actual behavior
No template matching the path foo/bar could be found for: org.acme.FooTemplates.bar
when running tests.How to Reproduce?
Reproducer project: https://github.com/mzellho/quarkus-quickstarts/tree/reproducer/40158
mvn test
onqute-quickstart
--> failsrc/test/resources/templates
--> successOutput of
uname -a
orver
Linux xxxxx 6.5.0-28-generic #29-Ubuntu SMP PREEMPT_DYNAMIC Thu Mar 28 23:46:48 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk version "21.0.3" 2024-04-16 LTS OpenJDK Runtime Environment Temurin-21.0.3+9 (build 21.0.3+9-LTS) OpenJDK 64-Bit Server VM Temurin-21.0.3+9 (build 21.0.3+9-LTS, mixed mode, sharing)
Quarkus version or git rev
3.9.5
Build tool (ie. output of
mvnw --version
orgradlew --version
)Running
/home/xxxxx/work/2/quarkus-quickstarts/mvnw
...Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: /home/xxxxx/.m2/wrapper/dists/apache-maven-3.8.6-bin/67568434/apache-maven-3.8.6
Java version: 21.0.3, vendor: Eclipse Adoptium, runtime: /home/xxxxx/.sdkman/candidates/java/21.0.3-tem
Default locale: de_DE, platform encoding: UTF-8
OS name: "linux", version: "6.5.0-28-generic", arch: "amd64", family: "unix"
Additional information
No response
The text was updated successfully, but these errors were encountered: