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

Ensure preference files only in problems view if open #10562

Merged
merged 7 commits into from
Jan 24, 2022

Conversation

colin-grant-work
Copy link
Contributor

@colin-grant-work colin-grant-work commented Dec 17, 2021

What it does

Fixes #7154 by disposing of the preference system's reference to the MonacoEditorModel when not in use. This is similar to VSCode's approach in which the model reference is disposed of at the end of the write.

How to test

  1. Open the application
  2. Open the problems view
  3. Open a preference file
  4. Ensure that the preference file has some problems (dangling commas, schema violations)
  5. Close the file
  6. Observe that the problems view does not continue to show the problems for the preference file when it is closed.

  1. Do normal preference operations (set values in the UI, set values in the file)
  2. Observe that the changes take effect as expected.

Review checklist

Reminder for reviewers

@colin-grant-work colin-grant-work added monaco issues related to monaco preferences issues related to preferences problems issues related to the problems widget labels Dec 22, 2021
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

The changes look really good to me 👍

The editor reference seems to be disposed as expected, removing the associated problems. As a consequence, the problems view isn't polluted with any configuration related issues.

I'll let others review as well.

Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

The changes look good to me 👍

  • confirmed the markers in the settings.json file only appear if the file is opened (similarly to vscode) so there is no noise on startup in the problems-view
  • confirmed that markers in the settings.json file are properly populated (ex: dangling commas, invalid preferences)
  • confirmed that updating preferences take effect like today

I noticed #10599 when testing but I confirmed that it also exists on master.

@colin-grant-work colin-grant-work force-pushed the bugfix/pref-files-in-problems branch 4 times, most recently from bc954df to 44a5a5c Compare January 12, 2022 16:19
@colin-grant-work colin-grant-work force-pushed the bugfix/pref-files-in-problems branch 4 times, most recently from 69b5f31 to 2c29751 Compare January 17, 2022 23:18
@colin-grant-work
Copy link
Contributor Author

@vince-fugnitto, I couldn't come up with a better solution to flakiness of these tests than just extending the timeout, and that seems to have gotten it through CI, at least. If you're OK with that, I'll write up breaking changes from this PR and merge it this week.

@colin-grant-work
Copy link
Contributor Author

@msujew, just want to confirm your (infomal) approval stands here?

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

@colin-grant-work Yep, still stands :)

I did a brief look over the changed code and performed another look at the App running with your changes. Everything is still looking good 👍

@colin-grant-work colin-grant-work merged commit f81ef73 into master Jan 24, 2022
@colin-grant-work colin-grant-work deleted the bugfix/pref-files-in-problems branch January 24, 2022 15:53
@github-actions github-actions bot added this to the 1.22.0 milestone Jan 24, 2022
@Okon199
Copy link

Okon199 commented Jul 7, 2022

Please help I'm working through alot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
monaco issues related to monaco preferences issues related to preferences problems issues related to the problems widget
Projects
None yet
Development

Successfully merging this pull request may close these issues.

json: markers reported on start for files not opened
4 participants