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 isolate script is passed as command arg when installing modules #11447

Merged
merged 1 commit into from
Apr 27, 2020

Conversation

karthiknadig
Copy link
Member

For #11399

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • Title summarizes what is changing.
  • Has a news entry file (remember to thank yourself!).
  • Appropriate comments and documentation strings in the code.
  • Has sufficient logging.
  • Has telemetry for enhancements.
  • Unit tests & system/integration tests are added/updated.
  • Test plan is updated as appropriate.
  • package-lock.json has been regenerated by running npm install (if dependencies have changed).
  • The wiki is updated with any design decisions/details.

return processService
.exec(options.command, pyArgs.concat(args), {})
.exec(options.command, pyArgs, {})
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a minor convenience change to help with debugging

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov-io
Copy link

codecov-io commented Apr 27, 2020

Codecov Report

Merging #11447 into master will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11447      +/-   ##
==========================================
- Coverage   61.03%   61.01%   -0.03%     
==========================================
  Files         613      613              
  Lines       33630    33631       +1     
  Branches     4751     4751              
==========================================
- Hits        20527    20520       -7     
+ Misses      12657    12079     -578     
- Partials      446     1032     +586     
Impacted Files Coverage Δ
src/client/common/installer/moduleInstaller.ts 94.66% <100.00%> (ø)
src/client/common/process/internal/python.ts 59.61% <100.00%> (+0.79%) ⬆️
...nterpreter/locators/services/currentPathService.ts 90.62% <100.00%> (ø)
src/datascience-ui/react-common/arePathsSame.ts 75.00% <0.00%> (-12.50%) ⬇️
src/client/common/utils/platform.ts 64.70% <0.00%> (-11.77%) ⬇️
...cience/ipywidgets/cdnWidgetScriptSourceProvider.ts 84.48% <0.00%> (-2.59%) ⬇️
src/client/datascience/debugLocationTracker.ts 76.56% <0.00%> (-1.57%) ⬇️
src/client/common/process/proc.ts 14.49% <0.00%> (-0.73%) ⬇️
src/client/testing/main.ts 14.38% <0.00%> (ø)
src/client/common/editor.ts 8.25% <0.00%> (ø)
... and 141 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ebfc9e7...c41a92e. Read the comment docs.

@@ -45,7 +45,7 @@ export abstract class ModuleInstaller implements IModuleInstaller {
? await interpreterService.getActiveInterpreter(resource)
: resource;
const pythonPath = isResource(resource) ? settings.pythonPath : resource.path;
const args = internalPython.execModule(executionInfo.moduleName, executionInfoArgs);
const args = internalPython.execModule(executionInfo.moduleName, executionInfoArgs, true, true);
Copy link

Choose a reason for hiding this comment

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

It's very easy to forget which boolean is which in calls like that. I know there's no named arguments in TS, but is there any other idiom that might make it more readable?

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree. @kimadeline any recommendations?

Choose a reason for hiding this comment

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

The only thing I can think of would be to use an options object, but it's not TS-specific. Seems to be a JS thing though. I remember talking about it with somebody on the team, can't remember who it was 😬

I actually use an options object in my pipenv PR, and my threshold was 2 booleans.

What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

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

I will update this in my next PR for this area.

@karthiknadig karthiknadig merged commit b2a0b59 into microsoft:master Apr 27, 2020
@karthiknadig karthiknadig deleted the issue11399 branch April 30, 2020 23:11
kimadeline added a commit to kimadeline/vscode-python that referenced this pull request May 14, 2020
kimadeline added a commit that referenced this pull request May 19, 2020
…ectly quoted (#11810)

* Revert "Ensure isolate script is passed as command arg when installing modules (#11447)"

This reverts commit b2a0b59.

* Format args in buildCommandForTerminal

* Typos
@lock lock bot locked as resolved and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants