-
Notifications
You must be signed in to change notification settings - Fork 222
serde_derive #82
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
Comments
Also let's upgrade to serde 0.9. |
The selected crates are based on the top 100 crates by downloads, then taking the newest version of those and their dependencies. You can check out the exact logic, if so inclined. Running the code as-is today, we would upgrade to:
I might just go ahead and perform that update tonight. But there's nothing that would cause Additionally, I think about how I'd explain to someone why a given crate is available or not. If it's "someone submitted a PR", then I fear we'd be compiling 1000s of crates every night. If it's "the maintainer picked it", then I fear the backlash directed towards me on public (and private?) forums. I would be interested in an improved algorithm that maybe could be more strongly influenced by recentness. Perhaps the most recent crates in the last 30-60-90 days would be better? |
I understand, although serde_codegen is 100% deprecated and there is no way to use it correctly from the playground (nor has there ever been). It is replaced by serde_derive which would be easily usable. |
Looking at the charts, serde_derive is much more popular today. Using last 90 days popularity seems like a good idea to me. |
The current rationale is that if the playground has to spend time compiling a crate as a dependency, it's going to try as hard as possible to allow using that crate directly. Obviously, it doesn't work for all crates. |
Are you aware if there is an API endpoint for the data of "the top N crates, sorted by downloads in the last Y days"? |
Would you be willing to compile crates that have a
|
I guess it can be added to https://github.com/sebasgarcep/crates-api ? |
Ah, that's very interesting! In that case, we'd pull in serde for whatever reason (such as top-100 all-time downloads or an improved recent measure), and then serde could inform us what features are best used to demonstrate itself in the playground. A technical question: do you know of a way of programmatically checking if a crate supports a feature, starting from only the name of the crate? A social question: do you think that crate maintainers would be overall receptive to adding such a feature? I'm assuming that serde would, or else you might not have suggested it 😇. Is it ugly from the point-of-view of a maintainer, to customize your packaging for this arbitrary context? |
I don't mind doing the HTTP / JSON myself, I just meant that I don't know that the crates.io server currently exposes such an endpoint. |
If you can get a Cargo.toml, the
Yes. I don't think this is a particularly unconventional use of cargo features. We already have things like "unstable-testing" for dependencies of our CI suite like clippy. |
I opened serde-rs/serde#755 to add a playground feature on our end. |
I opened #99 with an implementation of my proposed approach using a |
I've opened a new issue for potentially using recent crate downloads in #101 |
Not sure if it's against the protocol, but I'd vouch for serde_derive to be added to the top crates.
I wanted to add a modern playground example to http://stackoverflow.com/a/37565736/257568 but it turns out there's no serde_derive there yet.
I mean, Serde is certainly in the top crates, but we'd want to promote the newer serde_derive version of the automation instead of the older serde_macros, right?
The text was updated successfully, but these errors were encountered: