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

Clean up features #1001

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Clean up features #1001

wants to merge 2 commits into from

Conversation

Kijewski
Copy link
Collaborator

@Kijewski Kijewski commented Apr 6, 2024

  • Use dep: prefix to suppress implicit features: Our msrv is 1.65 by now, so we can safely use this rust 1.60 feature. This is a breaking change, because users could use either features = ["serde-json"] or ["serde_json"] to get the same result. With this change, only the former remains valid.

  • The features "mime" and "mime_guess" are deprecated and do nothing since #594. Keeping such deprecated features around can still cause confusion whether one needs to select them or not. It's been 2,5 year since #594 was merged, so I guess we can drop the features.

Our msrv is 1.65 by now, so we can safely use this rust 1.60 feature.

This is a breaking change, because users could use either
`features = ["serde-json"]` or `["serde_json"]` to get the same result.
With this change, only the former remains valid.
The features `"mime"` and `"mime_guess"` are deprecated and do nothing
since [djc#594]. Keeping such deprecated features around can still cause
confusion whether one needs to select them or not. It's been 2,5 year
since djc#594 was merged, so I guess we can drop the features.

[djc#594]: djc#594
@Kijewski
Copy link
Collaborator Author

Kijewski commented Apr 6, 2024

@GuillaumeGomez, do you know if it is possible to generate this page https://docs.rs/crate/askama/0.12.1/features locally?

humansize = ["askama_derive/humansize", "dep:humansize"]
markdown = ["askama_derive/markdown", "dep:comrak"]
num-traits = ["askama_derive/num-traits", "dep:num-traits"]
serde-json = ["askama_derive/serde-json", "askama_escape/json", "dep:serde", "dep:serde_json"]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For serde_json I think we should prefer the upstream spelling for the feature, now that we can do this. Maybe keep serde-json around as an alias (but change any mentions in documentation to the underscore variant)?

@GuillaumeGomez
Copy link
Collaborator

@GuillaumeGomez, do you know if it is possible to generate this page https://docs.rs/crate/askama/0.12.1/features locally?

We use cargo metadata --format-version 1 and then list the features from there. We could then generate a markdown from that and pass it as argument to rustdoc (like rustdoc features.md, because yes, rustdoc can generate HTML from markdown directly 😄 ).

@djc
Copy link
Owner

djc commented Apr 11, 2024

@Kijewski ping?

@djc djc mentioned this pull request May 7, 2024
5 tasks
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

Successfully merging this pull request may close these issues.

None yet

3 participants