Skip to content

Conveniance loader function #5

Open

Description

@aDotInTheVoid

Do

https://github.com/awslabs/smithy-rs/blob/f7e1f0836eb59e29fad668f9b0b3ad682757b5af/tools/api-linter/src/cargo.rs#L78-L100

but here so anyone can use it.

Not sure if this should live here or a seperate crate?

Activity

  1. Enselic commented on Feb 24, 2022

    @Enselic
    Member

    My recommendation/personal preference would be to let this crate remain a pure mirror of rustdoc-json-types in rust-lang/rust without any extra stuff.

    Just in case this thought of yours was initiated by Enselic/public-api#27: I was simply silly enough to assume 0.7.0 had not been released yet when I wrote it. I didn't think you would be that fast. Super super silly. Sorry :)

    The rustdoc JSON is still too much of a moving target for it to make sense to be "nice" about it IMHO. At least for a low-level crate like this one. On higher level crates it might very well make sense to be a bit nicer. In any case, I think it is better to put effort into making progress on rustdoc JSON itself rather than making this crate bigger.

  2. aDotInTheVoid commented on Mar 6, 2022

    @aDotInTheVoid
    MemberAuthor

    I think if/when I do this it should be a different crate

  3. Boscop commented on Oct 3, 2024

    @Boscop

    @aDotInTheVoid Thanks for the loader code :)
    +1 I think it would make sense to have it in this crate.

  4. jalil-salame commented on Oct 20, 2024

    @jalil-salame
    Contributor

    I don't think it should be in this crate as there is a bit of complexity involved, in cargo-semver-checks we might want to move to simd_json for it's tape API, which allows us to parse the JSON once, extract the version, then use the correct rustdoc-types::Crate to deserialize that version (without parsing the JSON again).

    simd_json is not 1.0 yet so I don't think rustdoc-types should depend on it. Maybe under a feature gate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions