-
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: fix template global class generation in the dev mode #45771
Conversation
Thanks @mkouba :) |
This comment has been minimized.
This comment has been minimized.
You could either add a test dependency on roq, or perhaps there's a way to declare a non-application class in |
I didn't want to add a test dependency on Roq. It would be used for all tests.
I didn't find a way... |
Actually, we could try generate a dummy global for a specific |
- if a non-application template global class is present we have to reflect this fact when assigning the priority for an application template global resolver; otherwise a conflict may occur
b694435
to
c9f1df1
Compare
* The {@link QuteDummyTemplateGlobalMarker} is used to identify an application archive where a dummy built-in class with | ||
* template globals is added. | ||
*/ | ||
public class TemplateGlobalDevModeTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FroMage ok, so I've added this test. It's a bit hacky but the build step that generates a dummy global is only executed in the dev mode and if QuteDummyTemplateGlobalMarker
is present.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can add custom build steps in your test, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah no, it's only for ProdMode tests. Well… I suppose we could add that to dev mode tests too…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah no, it's only for ProdMode tests. Well… I suppose we could add that to dev mode tests too…
And in QuarkusUnitTest
...
I have no idea how complicated this could be 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surely some work, up to you, I don't mind your build step :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In any case, it's out of scope of this PR. We could file a new issue and revisit the test later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI #45811
* The {@link QuteDummyTemplateGlobalMarker} is used to identify an application archive where a dummy built-in class with | ||
* template globals is added. | ||
*/ | ||
public class TemplateGlobalDevModeTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can add custom build steps in your test, no?
Status for workflow
|
This pull request should fix the problem demonstrated by https://github.com/FroMage/roq-qute-repro-globals.
Unfortunately, I don't know how to write an automated test easily. Ideally, we should add a
QuarkusDevModeTest
in Roq (which provides non-application template globals).