Skip to content

Fix namespace incremental parsing bug#37770

Merged
agocke merged 2 commits intodotnet:release/dev16.2from
agocke:fix-incremental-parsing
Aug 7, 2019
Merged

Fix namespace incremental parsing bug#37770
agocke merged 2 commits intodotnet:release/dev16.2from
agocke:fix-incremental-parsing

Conversation

@agocke
Copy link
Copy Markdown
Member

@agocke agocke commented Aug 6, 2019

There was a previous parsing change (#32999) which modified namespace
parsing to allow modifiers and attributes on namespaces, to improve
error recovery.

This PR contained a bug because it didn't move the incremental parsing
check to before parsing attributes and modifiers, which should now
be included in incremental parsing to prevent changes from being dropped

Fixes #37665, #37664, #37663

@agocke agocke added this to the 16.3.P3 milestone Aug 6, 2019
@agocke agocke requested a review from a team as a code owner August 6, 2019 22:00
@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

:(

Sorry about that.

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

So previous to this, was it the case that we basically wouldn't reuse the namespace decl because it had errors on it. But because there were no longer errors, we thought we could use it now? Definitely a subtle thing i hadn't considered.

@RikkiGibson
Copy link
Copy Markdown
Member

@jasonmalinowski indicated that this should be taken in 16.2 servicing

Copy link
Copy Markdown
Member

@jasonmalinowski jasonmalinowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to target 16.2. Feel free to dismiss this once that's been done.

There was a previous parsing change (dotnet#32999) which modified namespace
parsing to allow modifiers and attributes on namespaces, to improve
error recovery.

This PR contained a bug because it didn't move the incremental parsing
check to before parsing attributes and modifiers, which should now
be included in incremental parsing to prevent changes from being dropped

Fixes dotnet#37665, dotnet#37664, dotnet#37663
@agocke agocke changed the base branch from master to release/dev16.2 August 6, 2019 23:07
@agocke agocke force-pushed the fix-incremental-parsing branch from 63f5349 to 4b6ca77 Compare August 6, 2019 23:07
@RikkiGibson RikkiGibson dismissed jasonmalinowski’s stale review August 6, 2019 23:08

jason's ask was fulfilled

@agocke
Copy link
Copy Markdown
Member Author

agocke commented Aug 6, 2019

@CyrusNajmabadi No worries, now I got to fix my first incremental parsing bug 😄 I think you're right, this was probably working before because the modifiers and attributes were errors.

@agocke
Copy link
Copy Markdown
Member Author

agocke commented Aug 6, 2019

Actually, the modifiers and attributes were previously stored as skipped syntax, so they weren't part of the node at all. So the namespace node reuse was fine.

@agocke
Copy link
Copy Markdown
Member Author

agocke commented Aug 6, 2019

Ah, but that still would have dropped tokens. No, it's probably the errors.

@agocke agocke requested a review from gafter August 7, 2019 00:07
Copy link
Copy Markdown
Member

@gafter gafter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@agocke agocke merged commit c6bf2ea into dotnet:release/dev16.2 Aug 7, 2019
@agocke agocke deleted the fix-incremental-parsing branch August 7, 2019 20:43
@RikkiGibson
Copy link
Copy Markdown
Member

@agocke I noticed the issues marked as "will be fixed by this PR" are still open. Do you know what's going on there?

@agocke
Copy link
Copy Markdown
Member Author

agocke commented Aug 8, 2019

Probably just hasn't made it to master. I think that's when bugs get autoclosed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants