cargo-semver-checks icon indicating copy to clipboard operation
cargo-semver-checks copied to clipboard

Represent type information in the Trustfall schema

Open obi1kenobi opened this issue 2 years ago • 0 comments

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.

obi1kenobi avatar Oct 15 '22 17:10 obi1kenobi