Skip to content

fix change session by moving to async/await promise #1927

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

Merged
merged 2 commits into from
Apr 29, 2019

Conversation

TylerLeonhardt
Copy link
Member

PR Summary

I'll be honest... I don't really understand why this fixed the issue...

I think it's because we use to just return the Thenable where as now we're actually awaiting the settings update... but idk... in my eyes they seem equivalent.

Also, the test I've added passes in both scenarios even though the test does a good job emulating the environment...

I can only deduce that this is a race condition with vscode updating settings in the true vscode environment (instead of test harness).

With all that said... this does consistently fix the issue - and async/await is better anyway.

PR Checklist

Note: Tick the boxes below that apply to this pull request by putting an x between the square brackets.
Please mark anything not applicable to this PR NA.

  • PR has a meaningful title
  • Summarized changes
  • PR has tests
  • This PR is ready to merge and is not work in progress
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready

Copy link
Contributor

@rkeithhill rkeithhill left a comment

Choose a reason for hiding this comment

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

Not sure either why this fixes the issue but 👍 for the switch to async/await.

Copy link
Contributor

@rjmholt rjmholt left a comment

Choose a reason for hiding this comment

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

Wish I knew as well, but the important part is that @TylerLeonhardt has added a test so we can trust that the code knows itself

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