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

Removed a few more bits of code related to interpreters #59

Merged
merged 4 commits into from
Sep 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,12 @@ Resulting in a `ms-ai-tools-jupyter-insiders.vsix` file in your `vscode-jupyter`

## Development Build

If you would like to use the latest version of the extension as committed to `main` that has passed our test suite, then you may set the `"python.insidersChannel"` setting to `"daily"` or `"weekly"` based on how often you would like the extension to check for updates.
If you would like to use the latest version of the extension as committed to `main` that has passed our test suite, then you may set the `"jupyter.insidersChannel"` setting to `"daily"` or `"weekly"` based on how often you would like the extension to check for updates.

You may also download and install the extension manually from the following
[location](https://pvsc.blob.core.windows.net/extension-builds/ms-ai-tools-jupyter-insiders.vsix).
Once you have downloaded the
[ms-ai-tools-jupyter-insiders.vsix](https://pvsc.blob.core.windows.net/extension-builds/ms-ai-tools-jupyter-insiders.vsix)
file, please follow the instructions on
[this page](https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix)
to install the extension. Do note that the manual install will not automatically update to newer builds unless you set the `"python.insidersChannel"` setting (it will get replaced with released versions from the Marketplace once they are newer than the version install manually).
to install the extension. Do note that the manual install will not automatically update to newer builds unless you set the `"jupyter.insidersChannel"` setting (it will get replaced with released versions from the Marketplace once they are newer than the version install manually).
732 changes: 350 additions & 382 deletions ThirdPartyNotices-Distribution.txt

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions build/webpack/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ exports.nodeModulesToExternalize = [
'azure-storage',
'request',
'request-progress',
'source-map-support',
'diff-match-patch',
'sudo-prompt',
'node-stream-zip',
'xml2js',
'vsls/vscode',
Expand Down
27 changes: 1 addition & 26 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const spawn = require('cross-spawn');
const colors = require('colors/safe');
const path = require('path');
const del = require('del');
const sourcemaps = require('gulp-sourcemaps');
const fs = require('fs-extra');
const fsExtra = require('fs-extra');
const glob = require('glob');
Expand Down Expand Up @@ -295,12 +294,6 @@ function getAllowedWarningsForWebPack(buildConfig) {
throw new Error('Unknown WebPack Configuration');
}
}
gulp.task('renameSourceMaps', async () => {
// By default source maps will be disabled in the extension.
// Users will need to use the command `python.enableSourceMapSupport` to enable source maps.
const extensionSourceMap = path.join(__dirname, 'out', 'client', 'extension.js.map');
await fs.rename(extensionSourceMap, `${extensionSourceMap}.disabled`);
});

gulp.task('verifyBundle', async () => {
const matches = await glob.sync(path.join(__dirname, '*.vsix'));
Expand All @@ -311,7 +304,7 @@ gulp.task('verifyBundle', async () => {
}
});

gulp.task('prePublishBundle', gulp.series('webpack', 'renameSourceMaps'));
gulp.task('prePublishBundle', gulp.series('webpack'));
gulp.task('checkDependencies', gulp.series('checkNativeDependencies', 'check-datascience-dependencies'));
gulp.task('prePublishNonBundle', gulp.series('compile', 'compile-webviews'));

Expand Down Expand Up @@ -883,27 +876,9 @@ const hygiene = (options, done) => {
if (!options.skipLinter) {
result = result.pipe(tsl);
}
const totalTime = 0;
result = result
.pipe(tscFilesTracker)
.pipe(sourcemaps.init())
.pipe(tsc())
.pipe(
sourcemaps.mapSources((sourcePath, file) => {
let tsFileName = path.basename(file.path).replace(/js$/, 'ts');
const qualifiedSourcePath = path.dirname(file.path).replace('out/', 'src/').replace('out\\', 'src\\');
if (!fs.existsSync(path.join(qualifiedSourcePath, tsFileName))) {
const tsxFileName = path.basename(file.path).replace(/js$/, 'tsx');
if (!fs.existsSync(path.join(qualifiedSourcePath, tsxFileName))) {
console.error(`ERROR: (source-maps) ${file.path}[1,1]: Source file not found`);
} else {
tsFileName = tsxFileName;
}
}
return path.join(path.relative(path.dirname(file.path), qualifiedSourcePath), tsFileName);
})
)
.pipe(sourcemaps.write('.', { includeContent: false }))
.pipe(gulp.dest(dest))
.pipe(
es.through(null, function () {
Expand Down
5 changes: 0 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1844,7 +1844,6 @@
"stack-trace": "0.0.10",
"string-argv": "^0.3.1",
"strip-ansi": "^5.2.0",
"sudo-prompt": "^8.2.0",
"svg-to-pdfkit": "^0.1.8",
"tcp-port-used": "^1.0.1",
"tmp": "^0.0.29",
Expand Down
5 changes: 0 additions & 5 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
"jupyter.command.jupyter.opennotebook.title": "Open in Notebook Editor",
"jupyter.command.jupyter.opennotebookInPreviewEditor.title": "Open in preview Notebook Editor",
"jupyter.command.jupyter.importnotebookfile.title": "Convert to Python Script",
"jupyter.command.jupyter.enableSourceMapSupport.title": "Enable Source Map Support For Extension Debugging",
"jupyter.command.jupyter.exportoutputasnotebook.title": "Export Python Interactive Window as Jupyter Notebook",
"jupyter.command.jupyter.exportfileasnotebook.title": "Export Current Python File as Jupyter Notebook",
"jupyter.command.jupyter.exportfileandoutputasnotebook.title": "Export Current Python File and Output as Jupyter Notebook",
Expand Down Expand Up @@ -293,10 +292,6 @@
"DataScience.documentMismatch": "Cannot run cells, duplicate documents for {0} found.",
"DataScience.pythonInteractiveCreateFailed": "Failure to create a 'Python Interactive' window. Try reinstalling the Python extension.",
"diagnostics.removedPythonPathFromSettings": "We removed the \"python.pythonPath\" setting from your settings.json file as the setting is no longer used by the Python extension. You can get the path of your selected interpreter in the Python output channel. [Learn more](https://aka.ms/AA7jfor).",
"diagnostics.warnSourceMaps": "Source map support is enabled in the Jupyter Extension, this will adversely impact performance of the extension.",
"diagnostics.disableSourceMaps": "Disable Source Map Support",
"diagnostics.warnBeforeEnablingSourceMaps": "Enabling source map support in the Jupyter Extension will adversely impact performance of the extension.",
"diagnostics.enableSourceMapsAndReloadVSC": "Enable and reload Window",
"diagnostics.lsNotSupported": "Your operating system does not meet the minimum requirements of the Python Language Server. Reverting to the alternative autocompletion provider, Jedi.",
"diagnostics.invalidPythonPathInDebuggerSettings": "You need to select a Python interpreter before you start debugging.\n\nTip: click on \"Select Python Interpreter\" in the status bar.",
"diagnostics.invalidPythonPathInDebuggerLaunch": "The Python path in your debug configuration is invalid.",
Expand Down
5 changes: 0 additions & 5 deletions package.nls.nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"jupyter.command.jupyter.datascience.selectjupyteruri.title": "Jupyter-server-URI specificeren",
"jupyter.command.jupyter.datascience.importnotebook.title": "Jupyter-notebook importeren",
"jupyter.command.jupyter.datascience.importnotebookonfile.title": "Jupyter-notebook importeren",
"jupyter.command.jupyter.enableSourceMapSupport.title": "Bronkaartondersteuning voor extensie-debugging inschakelen",
"jupyter.command.jupyter.datascience.exportoutputasnotebook.title": "Interactief Python-venster als Jupyter-notebook exporteren",
"jupyter.command.jupyter.datascience.exportfileasnotebook.title": "Huidige Python-bestand als Jupyter-notebook exporteren",
"jupyter.command.jupyter.datascience.exportfileandoutputasnotebook.title": "Huidige Python-bestand exporteren en outputten als Jupyter-notebook",
Expand Down Expand Up @@ -99,10 +98,6 @@
"DataScience.jupyterNotebookConnectFailed": "Verbinden met Jupiter-notebook is niet gelukt. \r\n{0}\r\n{1}",
"DataScience.notebookVersionFormat": "Jupyter-notebook versie: {0}",
"DataScience.jupyterKernelSpecNotFound": "Kan geen Jupyter-kernel-spec aanmaken en er zijn er geen beschikbaar voor gebruik",
"diagnostics.warnSourceMaps": "Bronkaartondersteuning is ingeschakeld in de Python-extensie, dit zal een ongunstige impact hebben op de uitvoering van de extensie.",
"diagnostics.disableSourceMaps": "Bronkaartondersteuning uitschakelen",
"diagnostics.warnBeforeEnablingSourceMaps": "Bronkaartondersteuning inschakelen in de Python-extensie zal een ongunstige impact hebben op de uitvoering van de extensie.",
"diagnostics.enableSourceMapsAndReloadVSC": "Venster inschakelen en herladen",
"diagnostics.lsNotSupported": "Uw besturingssysteem voldoet niet aan de minimumeisen van de language server. Aan het terugschakelen naar het alternatief, Jedi.",
"DataScience.interruptKernel": "IPython-kernel onderbreken",
"DataScience.exportingFormat": "Aan het exporteren {0}",
Expand Down
1 change: 0 additions & 1 deletion package.nls.pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"jupyter.command.jupyter.selectjupyteruri.title": "Podaj identyfikator URI serwera Jupyter",
"jupyter.command.jupyter.importnotebook.title": "Importuj notatnik Jupyter",
"jupyter.command.jupyter.importnotebookonfile.title": "Importuj notatnik Jupyter",
"jupyter.command.jupyter.enableSourceMapSupport.title": "Włącz obsługę map źródłowych do debugowania rozszerzeń",
"jupyter.command.jupyter.exportoutputasnotebook.title": "Eksportuj okno IPython jako notatnik Jupyter",
"jupyter.command.jupyter.exportfileasnotebook.title": "Eksportuj bieżący plik Pythona jako notatnik Jupytera",
"jupyter.command.jupyter.exportfileandoutputasnotebook.title": "Eksportuj bieżący plik Pythona i jego wyniki jako notatnik Jupytera",
Expand Down
5 changes: 0 additions & 5 deletions package.nls.zh-tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"jupyter.command.jupyter.discoveringTests.title": "正在探索...",
"jupyter.command.jupyter.stopTests.title": "停止",
"jupyter.command.jupyter.configureTests.title": "設定測試",
"jupyter.command.jupyter.enableSourceMapSupport.title": "啟用供偵錯延伸模組的原始碼映射 (Source Map) 支援",
"jupyter.command.jupyter.analysis.clearCache.title": "清除模組分析快取",
"jupyter.snippet.launch.module.default": "請輸入-模組-名稱",
"jupyter.snippet.launch.attachpid.label": "Python: 使用處理程序 ID 連結",
Expand Down Expand Up @@ -80,10 +79,6 @@
"Installer.noCondaOrPipInstaller": "選取環境中沒有可用的 Conda 或 Pip 安裝工具。",
"Installer.noPipInstaller": "選取環境中沒有可用的 Pip 安裝工具。",
"Installer.searchForHelp": "搜尋說明",
"diagnostics.warnSourceMaps": "已在 Python 延伸模組中啟用原始碼映射 (Source Map) 支援,這會降低延伸模組效能。",
"diagnostics.disableSourceMaps": "停用原始碼映射 (Source Map) 支援",
"diagnostics.warnBeforeEnablingSourceMaps": "在 Python 延伸模組中啟用原始碼映射 (Source Map) 支援會降低延伸模組效能。",
"diagnostics.enableSourceMapsAndReloadVSC": "啟用並重新載入視窗",
"diagnostics.lsNotSupported": "您的作業系統不符合 Python 語言伺服器的最低需求。改回使用替代自動完成提供者 \"Jedi\"。",
"diagnostics.invalidPythonPathInDebuggerSettings": "開始偵錯前,您需要選取 Python 解譯器。\n\n小提示:按一下狀態列的 \"選擇 Python 解譯器\"。",
"diagnostics.invalidPythonPathInDebuggerLaunch": "偵錯設定檔的 Python 路徑無效。",
Expand Down
12 changes: 2 additions & 10 deletions src/client/activation/activationManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import { inject, injectable, multiInject, optional } from 'inversify';
import { TextDocument } from 'vscode';
import { IActiveResourceService, IDocumentManager, IWorkspaceService } from '../common/application/types';
import { PYTHON_LANGUAGE } from '../common/constants';
import { DeprecatePythonPath } from '../common/experiments/groups';
import { traceDecorators } from '../common/logger';
import { IFileSystem } from '../common/platform/types';
import { IDisposable, IExperimentsManager, IInterpreterPathService, Resource } from '../common/types';
import { IDisposable, Resource } from '../common/types';
import { Deferred } from '../common/utils/async';
import { IInterpreterService } from '../interpreter/contracts';
import { sendActivationTelemetry } from '../telemetry/envFileTelemetry';
Expand All @@ -32,9 +31,7 @@ export class ExtensionActivationManager implements IExtensionActivationManager {
@inject(IInterpreterService) private readonly interpreterService: IInterpreterService,
@inject(IWorkspaceService) private readonly workspaceService: IWorkspaceService,
@inject(IFileSystem) private readonly fileSystem: IFileSystem,
@inject(IActiveResourceService) private readonly activeResourceService: IActiveResourceService,
@inject(IExperimentsManager) private readonly experiments: IExperimentsManager,
@inject(IInterpreterPathService) private readonly interpreterPathService: IInterpreterPathService
@inject(IActiveResourceService) private readonly activeResourceService: IActiveResourceService
) {}

public dispose() {
Expand Down Expand Up @@ -63,11 +60,6 @@ export class ExtensionActivationManager implements IExtensionActivationManager {
}
this.activatedWorkspaces.add(key);

if (this.experiments.inExperiment(DeprecatePythonPath.experiment)) {
await this.interpreterPathService.copyOldInterpreterStorageValuesToNew(resource);
}
this.experiments.sendTelemetryIfInExperiment(DeprecatePythonPath.control);

// Get latest interpreter list in the background.
this.interpreterService.getInterpreters(resource).ignoreErrors();

Expand Down
5 changes: 1 addition & 4 deletions src/client/application/diagnostics/applicationDiagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,14 @@ import { traceError, traceInfo, traceWarning } from '../../common/logger';
import { IOutputChannel, Resource } from '../../common/types';
import { IServiceContainer } from '../../ioc/types';
import { IApplicationDiagnostics } from '../types';
import { IDiagnostic, IDiagnosticsService, ISourceMapSupportService } from './types';
import { IDiagnostic, IDiagnosticsService } from './types';

@injectable()
export class ApplicationDiagnostics implements IApplicationDiagnostics {
constructor(
@inject(IServiceContainer) private readonly serviceContainer: IServiceContainer,
@inject(IOutputChannel) @named(STANDARD_OUTPUT_CHANNEL) private readonly outputChannel: IOutputChannel
) {}
public register() {
this.serviceContainer.get<ISourceMapSupportService>(ISourceMapSupportService).register();
}
public async performPreStartupHealthCheck(resource: Resource): Promise<void> {
// When testing, do not perform health checks, as modal dialogs can be displayed.
if (isTestExecution()) {
Expand Down
6 changes: 0 additions & 6 deletions src/client/application/diagnostics/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,3 @@ export interface IDiagnosticCommand {
}

export type IDiagnosticMessageOnCloseHandler = (response?: string) => void;

export const ISourceMapSupportService = Symbol('ISourceMapSupportService');
export interface ISourceMapSupportService {
register(): void;
enable(): Promise<void>;
}
1 change: 0 additions & 1 deletion src/client/application/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ export interface IApplicationDiagnostics {
* @memberof IApplicationDiagnostics
*/
performPreStartupHealthCheck(resource: Resource): Promise<void>;
register(): void;
}
37 changes: 0 additions & 37 deletions src/client/common/dotnet/compatibilityService.ts

This file was deleted.

36 changes: 0 additions & 36 deletions src/client/common/dotnet/serviceRegistry.ts

This file was deleted.

Loading