Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Centralize the logic about wsl #55

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
jdneo merged 5 commits into master from cs/wsl-improve
Aug 9, 2018
Merged

Centralize the logic about wsl #55

jdneo merged 5 commits into master from cs/wsl-improve
Aug 9, 2018

Conversation

Copy link
Member

@jdneo jdneo commented Aug 7, 2018
edited
Loading

fix #48
fix #54

@jdneo jdneo added this to the 0.8.0 milestone Aug 7, 2018
Copy link
Member Author

jdneo commented Aug 7, 2018
edited
Loading

Hi @purocean,

As we have discussed before. We can have some further improvement about the WSL support.

During my own experience, the main problems of current implementation are:

  • WSL related logics separate in several different files
  • The leetCodeBinaryPath will be wrong if the setting of enableWSL is switched by users.
  • We are using IO blocking method (execFileSync) to parse the WSL path.

So this is the reason I create a new class: leetCodeExecutor, and try to put WSL related logic into this class as much as possible.

Very appreciated if you can help review this PR if you have time. Since this feature is originally contributed by you. 😄

Copy link
Contributor

purocean commented Aug 8, 2018

@jdneo OK, I'll take a look.

Copy link
Contributor

purocean commented Aug 8, 2018
edited
Loading

@jdneo
Have you tested with enable useWsl?

LeetCode extension need Node.js installed in environment path.

It occurs an error in my machine.

https://github.com/jdneo/vscode-leetcode/blob/8c52f42f37bcc48b0f79210545169e629ec456d3/src/utils/nodeUtils.ts#L10
https://github.com/jdneo/vscode-leetcode/blob/8c52f42f37bcc48b0f79210545169e629ec456d3/src/utils/cpUtils.ts#L11

Looks like have no specific treatment for WSL.

Copy link
Member Author

jdneo commented Aug 8, 2018

@purocean Nice finding! I'll fix it.

Copy link
Member Author

jdneo commented Aug 8, 2018

@purocean Updated. Please have a try when you have time.

Copy link
Contributor

purocean commented Aug 9, 2018

Copy link
Member Author

jdneo commented Aug 9, 2018

@purocean Emm, I'm sorry. Anything wrong with "Submitting to LeetCode..."?

Copy link
Contributor

purocean commented Aug 9, 2018

Copy link
Member Author

jdneo commented Aug 9, 2018

Haha, got it.

We can revisit the wording issue if we get user feedbacks in the future.

@jdneo jdneo merged commit 45bd545 into master Aug 9, 2018
@jdneo jdneo deleted the cs/wsl-improve branch August 9, 2018 12:28
ringcrl pushed a commit to ringcrl/vscode-leetcode that referenced this pull request Apr 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
0.8.0
Development

Successfully merging this pull request may close these issues.

The path of leetcode binary is wrong when switch between enable/disable wsl. Abstract leetcode command
2 participants

AltStyle によって変換されたページ (->オリジナル) /