askama icon indicating copy to clipboard operation
askama copied to clipboard

Emit an error if a syntax config already exists

Open GuillaumeGomez opened this issue 2 years ago • 6 comments

Fixes https://github.com/djc/askama/issues/674.

I realized that warnings were easy to ignore so I decided to turn it into an error. What do you think?

GuillaumeGomez avatar Apr 26 '22 16:04 GuillaumeGomez

The checks I'm running are far from enough. I'll update it.

GuillaumeGomez avatar Apr 27 '22 12:04 GuillaumeGomez

Out of curiosity, is the custom syntax you're working with intended for rustdoc or some other project? What's the use case?

djc avatar Apr 27 '22 14:04 djc

No, it's just that I don't like having settings being silently ignored. That's pretty much it. ^^'

EDIT: However my previous PRs were definitely for rustdoc. So when the new version is released, I'll update a few things in rustdoc.

GuillaumeGomez avatar Apr 27 '22 14:04 GuillaumeGomez

It should be ready now.

GuillaumeGomez avatar May 02 '22 15:05 GuillaumeGomez

So can you explain again what problem this is trying to solve? This seems like a bunch of complicated code trying to improve diagnostics for what's like an edge case of an edge case -- in other words, extremely niche...

djc avatar May 10 '22 08:05 djc

When your config adds a syntax which already exists. A problem I actually encountered in a test of this crate. :laughing:

GuillaumeGomez avatar May 10 '22 09:05 GuillaumeGomez

Okay, I'm inclined not to take this.

djc avatar Sep 15 '22 20:09 djc

Understandeable!

GuillaumeGomez avatar Sep 15 '22 22:09 GuillaumeGomez