-
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 checked templates - require type-safe expressions by default #16466
Conversation
mkouba
commented
Apr 13, 2021
- related to Non-existing template variable not reported by Qute #14534
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building cb56ccc
Full information is available in the Build summary check run. Test Failures⚙️ JVM Tests - JDK 11 Windows #📦 extensions/scheduler/deployment✖ ⚙️ JVM Tests - JDK 8 #📦 integration-tests/kafka✖ ✖ |
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building cb56ccc
Full information is available in the Build summary check run. Test Failures⚙️ JVM Tests - JDK 15 #📦 integration-tests/kafka✖ ✖ ⚙️ JVM Tests - JDK 8 #📦 integration-tests/kafka✖ ✖ |
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building 0fec673
|
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.
LGTM
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building 0fec673
Full information is available in the Build summary check run. Test Failures⚙️ JVM Tests - JDK 11 #📦 integration-tests/kafka✖ ✖ ⚙️ JVM Tests - JDK 15 #📦 integration-tests/kafka✖ ✖ ⚙️ JVM Tests - JDK 8 #📦 integration-tests/kafka✖ ✖ |
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'm late reviewing this, sorry, but this is nice and moves in the right direction.
I do wonder if we'll need something extra for side-loaded arguments.
Let me explain: quite often I've found myself to have a set-up where I have a main template (main.html
), and then specialised templates (order.html
, confirm.html
) which extend it.
The specialised templates would be checked and take a list of type-checked arguments. The main template however can use variables that are optional, or so global that they're set by adding them to the renderArgs
(in Play, it's a request-scoped map where you can add stuff passed to templates if ever one is rendered during the request) which you can access even from filters, not necessarily where you decide which template to render.
So for example, the currently logged-in user, or the notification messages would be such cases.
Perhaps in the case of Qute we can pass them to the main template differently. Perhaps not and we might need a way to declare them, without having to duplicate them on every checked-template, and passing them explicitely there. We also need a way to pass them.
Anyway, this is not for now, but I thought it's relevant so I'll mention it and we can think about this later when someone requests a feature like this.
Hm, so right now each template is validated separately. E.g. the extended template |