Skip to content

Register .dart_tool assets as externalSymbols #89

@matthewnitschke-wk

Description

@matthewnitschke-wk

Dart has a fairly common concept of generated files that can be placed directly in line with source, or referenced within a cache directory within .dart_tool

the .dart_tool directory is gitignored so assets themselves are not locatable without running a build and inspecting deeply nested files within .dart_tool

over_react is an example of a repo which generates these files and relies on them for backing prop classes

These references to .dart_tool symbols are triggering scip analysis errors due to the occurrence existing, but no declaration (since we dont index .dart_tool)

I have a long term vision of supporting a plugin system where libraries like OverReact would be able to adjust the indexing of the scip-indexer (goto definition on a generated prop class could take you to the mixin FooProps {...} instead of the backing dart map in the generated asset), but that vision is a long way off

In the meantime, just register all .dart_tool symbols as an externalSymbol so they are still included/indexed, but the analysis doesn't error out when attempting to index these

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