Skip to content

[SourceKit] Don't build an AST if no semantic info is requested #40353

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

Merged

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Dec 1, 2021

Currently, we were building an AST on document open or edit even if

  • key_enablesyntaxmap = 0
  • key_enablesubstructure = 0
  • key_enablediagnostics = 0 and
  • syntax tree transfer mode is off

In those cases we were just ignoring the result.

If all of the options are 0, don’t build an AST.

rdar://85847659

Currently, we were building an AST on document open or edit even if
- `key_enablesyntaxmap` = 0
- `key_enablesubstructure` = 0
- `key_enablediagnostics` = 0 and
- syntax tree transfer mode is off

In those cases we were just ignoring the result.

If all of the options are 0, don’t build an AST.

rdar://85847659
@ahoppen ahoppen requested review from akyrtzi and rintaro December 1, 2021 15:48
@ahoppen
Copy link
Member Author

ahoppen commented Dec 1, 2021

@swift-ci Please smoke test

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

Successfully merging this pull request may close these issues.

2 participants