Skip to content

[IDE] Loosen assertion check in IDE/SyntaxModelWalker #31465

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
merged 1 commit into from
May 4, 2020

Conversation

nathawes
Copy link
Contributor

@nathawes nathawes commented May 1, 2020

We were asserting that the attribute range recorded in the AST started at the same location as the fist unconsumed SyntaxNode in the file. This should be true in most cases, but isn't for misspelled attributes, corrected in the AST but not recognized or present in the list of SyntaxNodes. E.g.
@availability(...) comes through as if @available(...) was specified, but there's no SyntaxNode for it because we don't highlight invalid attributes (to indicate they're invalid).

Resolves rdar://problem/62201594
Resolves https://bugs.swift.org/browse/SR-12500

@nathawes nathawes requested a review from rintaro May 1, 2020 16:31
@nathawes
Copy link
Contributor Author

nathawes commented May 1, 2020

@swift-ci please test

We were asserting that the attribute range recorded in the AST started at the
same location as the fist unconsumed SyntaxNode in the file. This should be
true in most cases, but isn't for mispelled attributes, corrected in the AST
but not recognised or present in the list of SyntaxNodes. E.g.
@Availability(...) comes through as if @available(...) was specified, but
there's no SyntaxNode for it because we don't highlight invalid attributes
(to indicate they're invalid).

Resolves rdar://problem/62201594
Resolves https://bugs.swift.org/browse/SR-12500
@nathawes nathawes force-pushed the doc-info-availability-catalyst branch from b68199b to deecb58 Compare May 1, 2020 17:33
@nathawes
Copy link
Contributor Author

nathawes commented May 1, 2020

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented May 1, 2020

Build failed
Swift Test Linux Platform
Git Sha - b68199ba95abe7d8a52cfd05d1a959e7a32d2a81

@swift-ci
Copy link
Contributor

swift-ci commented May 1, 2020

Build failed
Swift Test OS X Platform
Git Sha - b68199ba95abe7d8a52cfd05d1a959e7a32d2a81

@swift-ci
Copy link
Contributor

swift-ci commented May 1, 2020

Build failed
Swift Test OS X Platform
Git Sha - b68199ba95abe7d8a52cfd05d1a959e7a32d2a81

@swift-ci
Copy link
Contributor

swift-ci commented May 1, 2020

Build failed
Swift Test Linux Platform
Git Sha - b68199ba95abe7d8a52cfd05d1a959e7a32d2a81

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.

3 participants