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

Develop new function to show the content of problem #127

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

Closed
qyazhang wants to merge 8 commits into LeetCode-OpenSource:master from qyazhang:develop

Conversation

Copy link

@qyazhang qyazhang commented Feb 15, 2019

This PR is started from the consideration that when I use this extension to solve leetcode problem, I always want to first check the description of the problem and then consider whether I will start to solve it or not. But right now "show problem" function only assume I want to solve it and create a source code file, and I could only see the problem description in that.
So I start to create a new "show problem" function to replace the original one, which could get the context of problem description and show it in a new window instead of creating a source code file.

What have done:

  • create new "showProblem" function

  • rename original "showProblem" function to "showToSolveProblem"

  • send post request to leetcode's graphql and open a WebView to show the description content referring to leetcode-cli

  • add "show problem" to right-click menu, and rename original "show problem" to "solve problem"

What haven't done:

  • Haven't add the "showProblem" support for "leetcode-cn.com"

  • Haven't add the left-click event to problem items to directly open the description content when we left-click (I've tried to implement it, and inherit LeetCodeNode from TreeItem and give command to each LeetCodeNode, but it didn't work. It may need further discussion)

twchn reacted with heart emoji
@qyazhang qyazhang marked this pull request as ready for review February 15, 2019 11:53
Copy link
Member

jdneo commented Feb 15, 2019

@qyazhang Thank you for contribution, would you mind to fix the CI failure first?

Copy link
Author

Thanks, I will fix it later (I'm sorry that I'm not so familiar with Typescript and this testing tool)

Copy link
Member

jdneo commented Feb 15, 2019
edited
Loading

Actually, I prefer creating an issue before sending out the PR.

In the issue, we can discuss the implementation first. Also this could be a chance to get feedback from the community.

Copy link
Author

I'm sorry I may need further time to solve the problem of "vsce package", I will close it and issue/PR again. Sorry for troubling

Copy link
Member

jdneo commented Feb 18, 2019

@qyazhang Don't worry, it's fine.

What kind of problem are you meeting with. I'm willing to help if I can.

Copy link
Author

Thanks for your kind.
I searched the error message and few solutions are found. I will try to debug it these days to find which changes lead to this error (the error message didn't indicate which parts lead to this error), if faced the same error again, I will try to solve it with you.

Copy link
Member

jdneo commented Feb 21, 2019

@qyazhang What error message were you get?

Copy link
Author

It show the error message like this

Executing prepublish script 'npm run vscode:prepublish'...
ERROR Command failed: npm run vscode:prepublish
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! vscode-leetcode@0.10.2 compile: tsc -p ./
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the vscode-leetcode@0.10.2 compile script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/zhang/.npm/_logs/2019-02-25T03_23_53_058Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! vscode-leetcode@0.10.2 vscode:prepublish: npm run compile
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the vscode-leetcode@0.10.2 vscode:prepublish script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/zhang/.npm/_logs/2019-02-25T03_23_53_083Z-debug.log

And the details in log is shown like this

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'compile' ]
2 info using npm@6.8.0
3 info using node@v10.13.0
4 verbose run-script [ 'precompile', 'compile', 'postcompile' ]
5 info lifecycle vscode-leetcode@0.10.2(削除) precompile: vscode-leetcode@0.10.2
6 info lifecycle vscode-leetcode@0.10.2 (削除ここまで)
compile: vscode-leetcode@0.10.2
7 verbose lifecycle vscode-leetcode@0.10.2(削除) compile: unsafe-perm in lifecycle true
8 verbose lifecycle vscode-leetcode@0.10.2 (削除ここまで)
compile: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/zhang/git/vscode-leetcode/node_modules/.bin:/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/zhang/git/vscode-leetcode/node_modules/.bin:/Users/zhang/perl5/bin:/usr/local/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/git/bin:/usr/local/sbin:/usr/local/git/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/zhang/.rvm/bin:/Users/zhang/.rvm/bin
9 verbose lifecycle vscode-leetcode@0.10.2(削除) compile: CWD: /Users/zhang/git/vscode-leetcode
10 silly lifecycle vscode-leetcode@0.10.2 (削除ここまで)
compile: Args: [ '-c', 'tsc -p ./' ]
11 silly lifecycle vscode-leetcode@0.10.2(削除) compile: Returned: code: 2 signal: null
12 info lifecycle vscode-leetcode@0.10.2 (削除ここまで)
compile: Failed to exec compile script
13 verbose stack Error: vscode-leetcode@0.10.2 compile: tsc -p ./
13 verbose stack Exit status 2
13 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:962:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid vscode-leetcode@0.10.2
15 verbose cwd /Users/zhang/git/vscode-leetcode
16 verbose Darwin 17.7.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "compile"
18 verbose node v10.13.0
19 verbose npm v6.8.0
20 error code ELIFECYCLE
21 error errno 2
22 error vscode-leetcode@0.10.2 compile: tsc -p ./
22 error Exit status 2
23 error Failed at the vscode-leetcode@0.10.2 compile script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]

(I'm sorry I'm busy at other things and didn't get further developement)

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
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants

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