Skip to content

Conversation

@srivatsn
Copy link
Contributor

@srivatsn srivatsn commented Dec 22, 2017

PreviewCodeAction was overriding ComputeOperations but returning a post-processed operation from the original action. This results in another PostProcess being called on the codeaction. If postprocess was overriden in originalaction that'll be ignored the second time

Customer scenario

Bring up the a lightbulb for a codeaction that has the postprocess method overridden. Click on the Preview Changes button to bring up the preview dialog and then apply the codeaction. This can lead to the codeaction crashing and being disabled.

Bugs this fixes

556195

Workarounds, if any

Also, why we think they are insufficient for RC vs. RC2, RC3, or RTW

Risk

This is generally a measure our how central the affected code is to adjacent
scenarios and thus how likely your fix is to destabilize a broader area of code

Performance impact

(with a brief justification for that assessment (e.g. "Low perf impact because no extra allocations/no complexity changes" vs. "Low")

Is this a regression from a previous update?

Root cause analysis

How did we miss it? What tests are we adding to guard against it in the future?

How was the bug found?

(E.g. customer reported it vs. ad hoc testing)

Test documentation updated?

If this is a new non-compiler feature or a significant improvement to an existing feature, update https://github.com/dotnet/roslyn/wiki/Manual-Testing once you know which release it is targeting.

…st-processed operation from original action. This results in another PostProcess being called on the codeaction. If postprocess was overriden in originalaction that'll be ignored the second time
@srivatsn srivatsn requested a review from a team as a code owner December 22, 2017 23:10
@mavasani
Copy link
Contributor

@dotnet-bot retest windows_debug_unit32_prtest please

@CyrusNajmabadi
Copy link
Member

Is it possible to have any sort of test for this? It seems really easy for this sort of thing to regress with all the virutal-members+crazy-inheritance that goes on in that type.

@sharwell sharwell self-requested a review January 19, 2018 18:47
@sharwell sharwell changed the base branch from master to dev15.6.x January 26, 2018 16:18
@sharwell
Copy link
Contributor

I tried to get a test added, but there's nothing that appears to cover the types involved.

@jinujoseph
Copy link
Contributor

approved via link

@jinujoseph jinujoseph merged commit 8b52fff into dotnet:dev15.6.x Jan 31, 2018
heejaechang pushed a commit that referenced this pull request Feb 2, 2018
* Remove duplicate lock DocumentState.s_syntaxTreeToIdMapLock

This lock is only being used to protect access to an instance which contains
internal synchronization.

* Better handle surrounding directives when inlining a local variable.

* Add tests.

* Share code between VB and C#.

* Reduce allocations in UnboundLambda

Fixes #23463

* Restore ReturnInferenceCacheKey as the key for _returnInferenceCache

* Update code to more closely follow patterns of the original code

* Cleanup from code review

* basic fix for intellisense in Immediate window

* better comments and cleanup

* Add basic integration tests

* cleanup inproc Immediate window integration test helper

* fix incorrect comment

* address PR feedback

* create Immediate window on ImmediateWindow_InProc.GetText()

* Verify MSBuild version in Developer CMD prompt

Roslyn is designed to have the simplest possible contribution story:
clone then build. Every pre-req needed is either located on the machine
or bootstrapped via NuGet. All the way down to using an xcopy MSBuild if
needed.

The one case which causes a problem is the VS command prompt. In this
case MSBuild is pre-installed on the machine and may or may not be
suitable for building Roslyn.

Previously when building from a VS command prompt we just used whatever
MSBuild was provided. The assumption being a developer command prompt
was an explicit statement of whath MSBuild you wanted to use. Based on
all of our customer reports though this does not seem to be the
assumption that consumers of our repo have. The build gave them no
explicit errors about the provided toolset and hence when the build
failed they assigned flakiness to our repo.

Going forward we are applying the same version validation to MSBuild
when provided via a developer command prompt. If it doesn't match we
will refuse to build asking the user to upgrade VS or build from a
normal command prompt.

* Remove unneeded debugging line

* Comment about pre-release

* Added minimum version

* Add Omit If Default style option

* Add space to be like test without the omit

* Add/Remove without needing a property

* Reformat

* PR feedback

* Fix VB diagnostic based on feedback

* Handle case of NotApplicable modifier and field declaration list

* Fix tests

* PR feedback

* PR feedback

* PreviewCodeAction was overriding ComputeOperations but returning a post-processed operation from original action. This results in another PostProcess being called on the codeaction. If postprocess was overriden in originalaction that'll be ignored the second time (#23920)

* Support negative null-check when we are suggesting to inline type checks

Fixes #21097
Fixes #24286

* fix a case where persistent storage registration fails and some clean… (#24458)

* fix a case where persistent storage registration fails and some clean up code around it.

* added readonly

* address PR feedback

* removed comments no longer relevant

* renamed lock name

* moved waiter from diagnostics.dll to features.dll where all interfaces are defined. (#24512)

* put listener change back in (#24120)

* leave old types in legacy folder until partner teams move to new interface

* added legacy waiter to support partner teams

* Remove methods indirecting access to _metadataFileNameToConvertedProjectReference

This field is documented as being written and read from any thread,
but in practice all uses are guarded by an AssertIsForeground(). Thus
we can get rid of the helper methods that are trying to "help" by
locking before accessing the fields, making it really hard to track all
the real uses of it.

* Make method static that doesn't need state

* add a comment to address PR feedback

* Fix up tests of P2P to metadata reference conversion

It turns out we had some tests, but the tests were disabled. This was
because the tests weren't working properly anyways: they were calling
into UpdateProjectBinPath which only updated some (but not all) of
the project state. That was an internal helper method that shouldn't
be used by tests. Updating the tests to use
SetBinOutputPathAndRelatedData works better.

* Delete debug-only reference validation

This was some legacy code that tried to verify that the references
we have from the project system match up to what DTE and other sources
say. This was debug-only, and the actual asserts were commented out.
This is deadweight at this point, so delete it.

* added and cleaned up logs around build and live diagnostics. (#24551)

also added RoslynActivityLogger that can be enabled through project-system-tool

* Avoid closure allocations on the BindSyntaxTreeToId fast path

* CS1628 error text mentions in parameters; fixes #24584

* Small cleanup of completion logic.

* Move to xunit.console for CoreClr tests

Previously we were using xunit.console for desktop tests and dotnet-xunit for our
CoreClr tests. This change unifies us on top of xunit.console (now that it has a
netcoreapp2.0 version available).

* Move unix builds to xunit.runner.console as well

* Get actual directory name, not file

* Fix dir name issue

* fixed build break
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.

5 participants