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

PTVS engine update + handling of the interpreter change #1613

Merged
merged 71 commits into from
May 9, 2018
Merged

PTVS engine update + handling of the interpreter change #1613

merged 71 commits into from
May 9, 2018

Conversation

MikhailArkhipov
Copy link

  • Update test baselines to reflect changes in VS engine
  • Add handling of interpreter change in the language client

(Multiroot WS issue is still open in #1149)

This pull request:

  • Has a title summarizes what is changing
  • Has unit tests & code coverage is not adversely affected (within reason)
  • Works on all actively maintained versions of Python (e.g. Python 2.7 & the latest Python 3 release)
  • Works on Windows 10, macOS, and Linux (e.g. considered file system case-sensitivity)

@@ -100,7 +127,7 @@ export class AnalysisExtensionActivator implements IExtensionActivator {
}

if (downloadPackage) {
const downloader = new AnalysisEngineDownloader(this.services, analysisEngineFolder);
this.appShell.showWarningMessage('.NET Runtime is not found, platform-specific Python Analysis Engine will be downloaded.');

Choose a reason for hiding this comment

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

Shouldn't this be an information message, instead of a warning?

@@ -194,12 +222,15 @@ export class AnalysisExtensionActivator implements IExtensionActivator {
}
}

// tslint:disable-next-line:no-string-literal
properties['DatabasePath'] = path.join(context.extensionPath, analysisEngineFolder);

Choose a reason for hiding this comment

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

No need to change, but you can avoid the linter messages if you define properties as follows:
const properties: {[key: string]:string} = {};

}

private async downloadFile(location: string, fileName: string, title: string): Promise<string> {
const uri = `${location}/${fileName}`;
this.output.append(`Downloading ${uri}... `);
const tempFile = await createTemporaryFile(downloadFileExtension);

const deferred = createDeferred();

Choose a reason for hiding this comment

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

This deferred is not used

@@ -96,4 +97,24 @@ export class FileSystem implements IFileSystem {
});
});
}

public copyFileAsync(src: string, dest: string): Promise<void> {

Choose a reason for hiding this comment

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

Please remove Async suffix.

return deferred.promise;
}

public deleteFileAsync(filename: string): Promise<void> {

Choose a reason for hiding this comment

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

Please remove Async suffix.

Copy link
Author

Choose a reason for hiding this comment

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

Should we remove them all from IFileSystem? Currently we [sort of] follow node's 'fs' which has plain and Sync

@@ -44,4 +44,6 @@ export interface IFileSystem {
// tslint:disable-next-line:unified-signatures
appendFileSync(filename: string, data: {}, options?: { encoding?: string; mode?: string; flag?: string }): void;
getRealPathAsync(path: string): Promise<string>;
copyFileAsync(src: string, dest: string): Promise<void>;

Choose a reason for hiding this comment

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

Please remove Async suffix.

@@ -0,0 +1 @@
Multiple fixes to format on type

Choose a reason for hiding this comment

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

I can't see any fixes for format on type or am I missing something.

@codecov
Copy link

codecov bot commented May 5, 2018

Codecov Report

Merging #1613 into master will decrease coverage by 0.36%.
The diff coverage is 5.05%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1613      +/-   ##
==========================================
- Coverage   71.62%   71.25%   -0.37%     
==========================================
  Files         277      273       -4     
  Lines       12816    12759      -57     
  Branches     2299     2293       -6     
==========================================
- Hits         9179     9092      -87     
- Misses       3502     3526      +24     
- Partials      135      141       +6
Impacted Files Coverage Δ
src/client/common/platform/types.ts 100% <ø> (ø) ⬆️
src/client/common/types.ts 100% <ø> (ø) ⬆️
src/client/activation/interpreterDataService.ts 12.08% <0%> (ø) ⬆️
src/client/activation/hashVerifier.ts 23.52% <0%> (ø) ⬆️
src/client/activation/analysis.ts 14.18% <2.77%> (-2.21%) ⬇️
src/client/activation/downloader.ts 17.14% <5.71%> (-3.32%) ⬇️
src/client/common/configSettings.ts 87.71% <50%> (-0.24%) ⬇️
src/client/common/platform/fileSystem.ts 62.9% <7.14%> (-16.27%) ⬇️
src/client/debugger/PythonProcess.ts 45.83% <0%> (-5.42%) ⬇️
src/client/common/process/pythonToolService.ts 66.66% <0%> (-4.77%) ⬇️
... and 33 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 128d231...cf5cf9c. Read the comment docs.

@MikhailArkhipov MikhailArkhipov merged commit f18a5ee into microsoft:master May 9, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 2019
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.

3 participants