Skip to content

PM UI: propagate ISolutionManager.ActionsExecuted event - #3654

Merged
dtivel merged 1 commit into
dev-feature-OE.PMUIfrom
dev-dtivel-oe-pmui-propagate-actionsexecuted-event
Sep 10, 2020
Merged

dtivel merged 1 commit into
dev-feature-OE.PMUIfrom
dev-dtivel-oe-pmui-propagate-actionsexecuted-event

Conversation

@dtivel

@dtivel dtivel commented Sep 10, 2020 •

Copy link
Copy Markdown
Contributor

Bug

Fixes: NuGet/Home#10012
Regression: Yes

  • Last working version: any dev branch build
  • How are we preventing it in future: adding test

Fix

Details: Executing the Update-Package command (among others) in Package Manager Console (PMC) raises the ISolutionManager.ActionsExecuted event by calling ISolutionManager.OnActionsExecuted(...). With recent remoting work, this code path isn't used any more by PM UI (like when a package is installed/updated/uninstalled in PM UI). Instead, a similar actions executed event is raised by calling INuGetUIContext.RaiseProjectActionsExecuted(...). Until PMC is made remoteable, NuGetUIContext will need to listen for the ISolutionManager.ActionsExecuted event and propagate the event as INuGetUIContext.ProjectActionsExecuted. This change will not result in INuGetUIContext.ProjectActionsExecuted firing twice for one operation.

Because the lowest common parameter type for both of these events is a simple string (representing the project ID of the affected project), the new event (INuGetUIContext.ProjectActionsExecuted) has been updated to pass project ID's instead of executed actions.

Testing/Validation

Tests Added: Yes

@dtivel
dtivel requested a review from a team as a code owner September 10, 2020 16:29
@rrelyea

rrelyea commented Sep 10, 2020

Copy link
Copy Markdown
Contributor

I'm assuming this will work with most PMC operations? Install, Uninstall, Update?
Any other problems that we are aware of?

@dtivel

dtivel commented Sep 10, 2020 •

Copy link
Copy Markdown
Contributor Author

It will work with any PMC operation that calls RefreshUI(...) like Update-Package does. No other known issues other than PMC generally not being remote-ready. This bug was about PM UI regressing a local-only scenario.

@dtivel
dtivel merged commit 33f7b46 into dev-feature-OE.PMUI Sep 10, 2020
@dtivel
dtivel deleted the dev-dtivel-oe-pmui-propagate-actionsexecuted-event branch September 10, 2020 16:59
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