Skip to content

Represent type information in the Trustfall schema #149

@obi1kenobi

Description

@obi1kenobi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: new or existing lintC-enhancementCategory: raise the bar on expectations

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions