Skip to content
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

0.13.0 release planning #1035

Open
7 tasks done
djc opened this issue May 7, 2024 · 14 comments
Open
7 tasks done

0.13.0 release planning #1035

djc opened this issue May 7, 2024 · 14 comments

Comments

@djc
Copy link
Collaborator

djc commented May 7, 2024

We've accumulated quite a bunch of stuff, and should probably release some time soon.

Any thoughts on open issues/PRs (especially changes that affect the public API/behavior) that shouldn't miss the 0.13.0 release?

Here are some open PRs that I think should go in:

@GuillaumeGomez
Copy link
Collaborator

Agreed. It'd be nice to have the book situation fixed too at some point.

@lopld
Copy link

lopld commented May 18, 2024

I am using Askama in my project, and I am very satisfied with it. I have reviewed and used various frameworks, but there was no tool as concise and intuitive as Askama. Please continue to give it your attention. Thank you.

@a-irizi
Copy link

a-irizi commented Sep 1, 2024

hi, i used askama in a rewrite form java spring boot with thymeleaf, and i liked it allot. the only feature that would make it even nicer for me is nested templates blocks. one other thing that i noticed and it would be nice if it got fixed is error reporting, it would be nice if the errors show more context about the template file and the line number as an example.

in general i really enjoyed working with askama, and i'm looking forward for the 0.13 release.

@darrenmothersele
Copy link

It would be nice to get block fragment rendering released. 🙏

@joshka
Copy link

joshka commented Dec 14, 2024

it would be nice if it got fixed is error reporting, it would be nice if the errors show more context about the template file and the line number as an example.

There was a PR or discussion about using Darling a while back. The error message is more descriptive about what the problem is: Ex:

error: Unknown field: `block`
  --> test-darling/src/main.rs:11:29
   |
11 | #[template(path="foo.html", block=bar)]
   |                             ^^^^^

compared with the current error message:

unsupported attribute key Ident { ident: "block", span: #0 bytes(16214..16219) } found

Would this be worth revisiting for better error handling?

@Kijewski
Copy link
Collaborator

There was a PR or discussion about using Darling a while back. The error message is more descriptive about what the problem is: Ex: …

Already fixed in the current rinja version: https://rinja-rs.github.io/play-rinja/?saved=eJwrM4wxUI4uSc0tyEksSdVIrShRsFVQyijJzVHSUUjKyU_OBvKTEos0Y7mKS4pKk0sUQqxjDADnzRF2, which will become the next askama release.

@joshka
Copy link

joshka commented Dec 16, 2024

My point wasn't about the block attribute being unsupported. I'm aware that that is fixed in the unreleased 0.13 version.

My point was that any error message in Askama caused by a misconfiguration leads to an error message which takes longer to diagnose than it should. That can be as simple as a typo in an attribute (blocks vs block), an extra punctuation character (path == "foo.html") or any sort of thing.

@Kijewski
Copy link
Collaborator

I know, and the error message for unknown attributes is good now. Click the link.

@joshka
Copy link

joshka commented Dec 16, 2024

Ah - ok, so there's code which isn't anywhere in this repo which is tested in another repo? Any chance you can expand on what's happening with the reunification with rinja? I don't see any discussion / issue / info about it anywhere.

@Kijewski
Copy link
Collaborator

Yeah, we should really do that. Right now it's handled kinda behind the scenes between @djc, @GuillaumeGomez, and me.

Short answer: We have only a few PRs that need to be fixed, then the current rinja master will become askama 0.13, and the rinja crate will get a message that it's deprecated in favor of askama. But please don't expect any of that to happen in this year, though.

@joshka
Copy link

joshka commented Dec 16, 2024

Sounds like a good idea that would be positive for the project's health. Looking forward to it :)

@a-irizi
Copy link

a-irizi commented Dec 25, 2024

Would this be worth revisiting for better error handling?

certainty. but the current message is fine too so i wouldn't give it a high priority if it's allot of work to get it done.

the biggest issue that i got was when compiling code and my template had an error, when compiling i got a hint of what's wrong, along with rust code (i guess the code generated from the templates).

what i rather have is a more user friendly message that shows me where in my template (HTML not rust) was there an error (something like miette as an example)

this happened allot when i made a some fields optional. and now instead of having an error message showing me where exactly in my HTML template did i mess up. it shows me some rust code that i have to decipher.

this was the biggest pain point for me aside from not being able to use nested blocks.

otherwise i think this is a very solid project, one that relieves you from the mental overhead of always checking that a DTO and a template are always in sync and only finding out that they are not at runtime (which is why i enjoyed it allot but i came across the debugging issue).

if it's not clear i can provide some code examples if you want

@rfdonnelly
Copy link

Here's another for 0.13. It fixes askama for the recently released axum 0.8.

@GuillaumeGomez
Copy link
Collaborator

We dropped askama_axum so no need to fix it. We instead added a chapter on how to convert Result. Example here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants