Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register .dart_tool assets as externalSymbols #89

Open
matthewnitschke-wk opened this issue Aug 29, 2023 · 0 comments
Open

Register .dart_tool assets as externalSymbols #89

matthewnitschke-wk opened this issue Aug 29, 2023 · 0 comments

Comments

@matthewnitschke-wk
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant