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

fix scheme name resolution, and schema load on WSL #5327

Merged
1 commit merged into from
Jul 1, 2020
Merged

fix scheme name resolution, and schema load on WSL #5327

1 commit merged into from
Jul 1, 2020

Conversation

johnazariah
Copy link
Member

@johnazariah johnazariah commented Apr 12, 2020

This PR fixes the scheme resolution bug outlined in #5326

The approach is as follows:

  • In [SchemeManager.cs], find the first scheme parser that actually
    successfully parses the scheme, as opposed to the existing code, which
    finds the first scheme parser which says it can parse the scheme, as
    that logic spuriously returns true currently.
  • In [XmlSchemeParser.cs] and [JsonParser.cs], ensure that the contents
    of the file are read and the contents passed to XmlDocument.LoadXXX,
    as this fails with an UriException on WSL otherwise.
  • Remove CanParse as it is superfluous. The check for a valid scheme
    parser should not just check an extension but also if the file exists
    • this is best done by the ParseScheme function as it already
      returns null on failure.
  • Add FileExtension to the interface because we need it lifted now.

Closes #5326

Copy link
Member

@miniksa miniksa left a comment

Choose a reason for hiding this comment

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

I'm good with this. Sorry for the delay and thanks for the contribution!

@miniksa miniksa added Area-Settings Issues related to settings and customizability, for console or terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Second It's a PR that needs another sign-off Product-Colortool This is a problem with the utility application ColorTool for manipulating the console color palette. labels Jun 5, 2020
@ghost ghost requested review from zadjii-msft, carlos-zamora and leonMSFT June 5, 2020 16:17
@miniksa miniksa requested a review from DHowett June 5, 2020 16:19
@ghost ghost added Area-CodeHealth Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc. Priority-3 A description (P3) labels Jul 1, 2020
@DHowett
Copy link
Member

DHowett commented Jul 1, 2020

Holy shit, I left a community member out to dry for three months. I'm so sorry.

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

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

You've even fixed the line endings, something git add --renormalize STILL refuses to do (i do not understand the point of this tool)

@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jul 1, 2020
@DHowett DHowett added the AutoMerge Marked for automatic merge by the bot when requirements are met label Jul 1, 2020
@ghost
Copy link

ghost commented Jul 1, 2020

Hello @DHowett!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 436fac6 into microsoft:master Jul 1, 2020
@DHowett
Copy link
Member

DHowett commented Jul 1, 2020

Thanks so much for fixing this.

@johnazariah
Copy link
Member Author

Thanks so much for fixing this.

You are so welcome :)

No worries on it taking a while to get included - these are crazy times :)

Thank you for making me feel welcome :)

@ghost ghost removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jul 2, 2020
@johnazariah johnazariah deleted the colortool/bug/wsl-scheme-resolution branch July 2, 2020 01:22
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-CodeHealth Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc. Area-Settings Issues related to settings and customizability, for console or terminal AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Second It's a PR that needs another sign-off Priority-3 A description (P3) Product-Colortool This is a problem with the utility application ColorTool for manipulating the console color palette.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ColorTool does not resolve schemes properly, and does not work with WSL paths
3 participants