Skip to content

Move todo comments analyzer to Editor Features#51643

Merged
davidwengier merged 3 commits intodotnet:mainfrom
davidwengier:MoveTodoCommentsToEF
Mar 9, 2021
Merged

Move todo comments analyzer to Editor Features#51643
davidwengier merged 3 commits intodotnet:mainfrom
davidwengier:MoveTodoCommentsToEF

Conversation

@davidwengier
Copy link
Member

FYI @Therzok

There isn't much to this so I don't think its going to fundamentally fix anything in VS Mac, but we may as well prevent them having to copy the source code if there isn't a good reason to.

@davidwengier davidwengier requested a review from a team as a code owner March 3, 2021 22:45
@ghost ghost added the Area-IDE label Mar 3, 2021
@davidwengier davidwengier changed the title Move todo comments to Editor Features Move todo comments analyzer to Editor Features Mar 3, 2021
@CyrusNajmabadi
Copy link
Contributor

CyrusNajmabadi commented Mar 3, 2021

Move todo comments analyzer to Editor Features

Can this not be at the Features or even Workspace level? I don't see anything Editor specific about this (i.e. using buffers/views).

Base automatically changed from master to main March 3, 2021 23:53
@davidwengier
Copy link
Member Author

Move todo comments analyzer to Editor Features

Can this not be at the Features or even Workspace level? I don't see anything Editor specific about this (i.e. using buffers/views).

Updated. Cunningham's Law strikes again :)

@sharwell

This comment has been minimized.

Copy link
Contributor

@sharwell sharwell left a comment

Choose a reason for hiding this comment

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

I have no strong objection to trying to move InProcTodoCommentsIncrementalAnalyzer down to the Features layer, but there is a big remaining problem: InProcTodoCommentsIncrementalAnalyzerProvider is not exported (claimed by design), which means this move does not make TODO comments scanning any easier for external consumers. We need to either move VisualStudioTodoCommentsService or find a way to register the provider without breaking functionality.

@davidwengier
Copy link
Member Author

@sharwell It's not clear to me why we need to do that before merging this PR, given that it wasn't a goal of this PR nor is made any more difficult by this PR.

@allisonchou
Copy link
Contributor

/azp run

@dotnet dotnet deleted a comment from azure-pipelines bot Mar 4, 2021
@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@sharwell
Copy link
Contributor

sharwell commented Mar 4, 2021

@davidwengier It's not clear what the purpose of this pull request is. AbstractTodoCommentsIncrementalAnalyzer already lives in the features layer, and the changes proposed by this pull request do not align with the claim that it removes the need to implement these types separately (as the types are not exposed). Even if IVTs are involved, it's not desirable to adjust the code in ways that specifically facilitate increased use of APIs through IVTs.

@davidwengier
Copy link
Member Author

@davidwengier David Wengier FTE It's not clear what the purpose of this pull request is.

The purpose is solely to prevent VSMac having to source-copy the incremental analyzer and analyzer provider. It comes from a request here if you have access.

it's not desirable to adjust the code in ways that specifically facilitate increased use of APIs through IVTs.

I agree with the spirit of this comment, but when the alternative option is copying source code which then becomes stale, I think allowing the IVT is the objectively better choice. I think thats especially true for something like this which is a pure move. If I'd left the namespaces in tact in the files there would have been no code changes at all.

For good or bad VSMac has extensive use of IVTs and I don't feel that blocking individual PRs does anything other than make life harder for the VSMac team, or in some cases prevents them shipping software. There was a larger conversation around trying to move them to external access but it was ruled out because the scope is too large, and the resources too little.

@sharwell
Copy link
Contributor

sharwell commented Mar 4, 2021

In this case it seems desirable to keep the current form. When we do move the implementation, it should be moved and exposed only through an external access layer which VS Mac can use. Otherwise we're just going to have to do the same work twice and break VS Mac both times.

@davidwengier
Copy link
Member Author

Desirable to who? The VS Mac team have asked for it (that comment I linked to is an open PR on their end, refactoring their todo comment implementation) and yes this will break VS Mac, but i'm the one who fixes those breaks, so if you're blocking my PR in order to save me work, you may rest assured that I considered that in advance 😛

@sharwell sharwell dismissed their stale review March 5, 2021 19:21

Withdrawing block, though I'm still not particularly happy with the way this is structured

@davidwengier davidwengier requested a review from a team March 9, 2021 00:11
@davidwengier davidwengier merged commit 7cee01b into dotnet:main Mar 9, 2021
@davidwengier davidwengier deleted the MoveTodoCommentsToEF branch March 9, 2021 01:10
@allisonchou allisonchou added this to the Next milestone Mar 12, 2021
@allisonchou allisonchou modified the milestones: Next, 16.10.P2 Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants