cargo-semver-checks
cargo-semver-checks copied to clipboard
Represent type information in the Trustfall schema
Currently, the schema that lints query does not represent type information. This means that lints like "changed the type of a pub field" can't be written since we can't compare the before-and-after types of fields, function parameters, etc.
The current schema cargo-semver-checks is defined here: https://github.com/obi1kenobi/trustfall-rustdoc-adapter/blob/main/src/rustdoc_schema.graphql
Any schema design needs to consider (and provide examples for):
- How we'd represent generic types (
Vec<usize>
), lifetime information (&'a u64
), tuples,dyn Trait
, etc. - What queries that compare types would look like.
- How to ensure there are no false-positives in semver lints, while also keeping the schema as simple as possible.