Skip to content
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

Results Panel not Refreshing Automatically #669

Closed
bijuchacko opened this issue Feb 2, 2017 · 6 comments
Closed

Results Panel not Refreshing Automatically #669

bijuchacko opened this issue Feb 2, 2017 · 6 comments
Assignees
Labels

Comments

@bijuchacko
Copy link

  • MSSQL Extension Version: 0.2.0
  • VSCode Version: 1.9.0
  • OS Version: Windows 10

Just upgraded to stable version 1.9.0 and noticed that the results panel does not refresh automatically every time I run the query. It used to work fine with the previous version of VSCode.

Steps to Reproduce:

  1. Execute a query
  2. Modify the query and run again, the results pane will not automatically refresh with the results for the modified query.
@kevcunnane
Copy link
Contributor

We've discovered this ourselves - this is due to a breaking change in VSCode. See microsoft/vscode#19732 for the tracking issue there. We are actively investigating a workaround in our own extension code so that we can release a hotfix version and unblock users.

I would recommend you adding your voice to the VSCode issue also - this will help get this raised as a breaking change that is impacting users.

@egamma
Copy link
Member

egamma commented Feb 2, 2017

@bijuchacko we (the VS Code team is definitly listening). Thanks for the reproducable steps, we will look into this.

@bijuchacko
Copy link
Author

@kevcunnane @egamma Thanks for the prompt response. I have downgraded to 1.8.1, thank you so much for this awesome editor and extension!

@kevcunnane
Copy link
Contributor

We've traced the issue on our side and have a fix that we'll be able to apply as an extension update.

HotFix information
Ensure that TextDocumentContentProvider.provideTextDocumentContent always provides an updated string when being refreshed.

Root cause
We implement TextDocumentContentProvider to represent our results. This expects you to fire an onDidChange event whenever you want to refresh your content, which then requests the updated document contents by calling your provideTextDocumentContent method.

  • We always return the same string, which kicks off our mini HTML app
  • In VSCode 1.9.0, it does a string comparison and only refreshes the page if the content is different
  • A short term fix is therefore to change the content so that it detects a difference and refreshes the document

Long term fix on our side
We can handle this better on our side - currently we call resetSocket to kill the current WebSocket communications channel and then do a full refresh. If there's a document open & visible already, we should instead sent a "reset" event so it clears its current state and then processes the new data instead. However this will take time to implement so skipping for now.

kevcunnane pushed a commit that referenced this issue Feb 3, 2017
- Fixes #669
- Ensures that TextDocumentContentProvider.provideTextDocumentContent always provides an updated string when being refreshed. In VSCode 1.9.0, it's vital to do this as there is a diff on the provided content and the document is only refreshed if this is different
kevcunnane added a commit that referenced this issue Feb 3, 2017
- Fixes #669
- Ensures that TextDocumentContentProvider.provideTextDocumentContent always provides an updated string when being refreshed. In VSCode 1.9.0, it's vital to do this as there is a diff on the provided content and the document is only refreshed if this is different
- Updated release version
@kevcunnane
Copy link
Contributor

@bijuchacko @egamma - The fix for this is now released as version 0.2.1. If you update MSSQL from the Extensions tab you should no longer see this issue. Thank you for raising this and I hope you enjoy using our extension inside VSCode 1.9.0 now this issue is resolved.

@egamma
Copy link
Member

egamma commented Feb 3, 2017

@kevcunnane great 🌹

kevcunnane added a commit that referenced this issue Feb 3, 2017
* Switch publisher in telemetry test to ms-mssql (#556)

* Switch publisher in telemetry test to ms-mssql

* Update a couple more hard-coded publisher references.

* Fix Results Panel not Refreshing Automatically (#670)

- Fixes #669
- Ensures that TextDocumentContentProvider.provideTextDocumentContent always provides an updated string when being refreshed. In VSCode 1.9.0, it's vital to do this as there is a diff on the provided content and the document is only refreshed if this is different
- Updated release version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants