Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into connor4312/debug-read…
Browse files Browse the repository at this point in the history
…-memory
  • Loading branch information
connor4312 committed Jan 4, 2022
2 parents a8501a0 + a3482c3 commit f9ada96
Show file tree
Hide file tree
Showing 195 changed files with 2,913 additions and 1,750 deletions.
48 changes: 24 additions & 24 deletions .github/commands.json

Large diffs are not rendered by default.

18 changes: 15 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
}
],
"eslint.options": {
"rulePaths": ["./build/lib/eslint"]
"rulePaths": [
"./build/lib/eslint"
]
},
"typescript.tsdk": "node_modules/typescript/lib",
"npm.exclude": "**/extensions/**",
Expand All @@ -52,11 +54,15 @@
"typescript.preferences.quoteStyle": "single",
"json.schemas": [
{
"fileMatch": ["cgmanifest.json"],
"fileMatch": [
"cgmanifest.json"
],
"url": "./.vscode/cgmanifest.schema.json"
},
{
"fileMatch": ["cglicenses.json"],
"fileMatch": [
"cglicenses.json"
],
"url": "./.vscode/cglicenses.schema.json"
}
],
Expand All @@ -78,6 +84,12 @@
"editor.formatOnSave": true
},
"typescript.tsc.autoDetect": "off",
"editor.inlayHints.enabled": true,
"typescript.inlayHints.enumMemberValues.enabled": true,
"typescript.inlayHints.functionLikeReturnTypes.enabled": true,
"typescript.inlayHints.parameterTypes.enabled": true,
"typescript.inlayHints.propertyDeclarationTypes.enabled": true,
"typescript.inlayHints.variableTypes.enabled": true,
"testing.autoRun.mode": "rerun",
"conventionalCommits.scopes": [
"tree",
Expand Down
3 changes: 1 addition & 2 deletions build/monaco/README-npm.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ npm module and unless you are doing something special (e.g. authoring a monaco e
and consumed independently), it is best to consume the [monaco-editor](https://www.npmjs.com/package/monaco-editor) module
that contains this module and adds languages supports.

The Monaco Editor is the code editor that powers [VS Code](https://github.com/microsoft/vscode),
a good page describing the code editor's features is [here](https://code.visualstudio.com/docs/editor/editingevolved).
The Monaco Editor is the code editor that powers [VS Code](https://github.com/microsoft/vscode). Here is a good page describing some [editor features](https://code.visualstudio.com/docs/editor/editingevolved).

This npm module contains the core editor functionality, as it comes from the [vscode repository](https://github.com/microsoft/vscode).

Expand Down
8 changes: 6 additions & 2 deletions extensions/configuration-editing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
".devcontainer.json"
],
"filenamePatterns": [
"**/.devcontainer/devcontainer.json",
"**/.devcontainer/devcontainer.json",
"**/User/snippets/*.json"
]
]
}
],
"jsonValidation": [
Expand Down Expand Up @@ -136,6 +136,10 @@
{
"fileMatch": "%APP_SETTINGS_HOME%/globalStorage/ms-vscode-remote.remote-containers/imageConfigs/*.json",
"url": "./schemas/attachContainer.schema.json"
},
{
"fileMatch": "**/quality/*/product.json",
"url": "vscode://schemas/vscode-product"
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion extensions/git/src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function findGitDarwin(onValidate: (path: string) => boolean): Promise<IGit> {
return e('git not found');
}

const path = gitPathBuffer.toString().replace(/^\s+|\s+$/g, '');
const path = gitPathBuffer.toString().trim();

function getVersion(path: string) {
if (!onValidate(path)) {
Expand Down
4 changes: 2 additions & 2 deletions extensions/typescript-language-features/src/utils/tsconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ export async function openProjectConfigOrPromptToCreate(

const selected = await vscode.window.showInformationMessage(
(projectType === ProjectType.TypeScript
? localize('typescript.noTypeScriptProjectConfig', 'File is not part of a TypeScript project. Click [here]({0}) to learn more.', 'https://go.microsoft.com/fwlink/?linkid=841896')
: localize('typescript.noJavaScriptProjectConfig', 'File is not part of a JavaScript project Click [here]({0}) to learn more.', 'https://go.microsoft.com/fwlink/?linkid=759670')
? localize('typescript.noTypeScriptProjectConfig', 'File is not part of a TypeScript project. View the [tsconfig.json documentation]({0}) to learn more.', 'https://go.microsoft.com/fwlink/?linkid=841896')
: localize('typescript.noJavaScriptProjectConfig', 'File is not part of a JavaScript project. View the [jsconfig.json documentation]({0}) to learn more.', 'https://go.microsoft.com/fwlink/?linkid=759670')
),
CreateConfigItem);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ suite('Notebook Editor', function () {
assert.strictEqual(vscode.window.visibleNotebookEditors.length, 2);
});

test('Notebook Editor Event - onDidChangeVisibleNotebookEditors on open/close', async function () {
test.skip('Notebook Editor Event - onDidChangeVisibleNotebookEditors on open/close', async function () { // TODO@rebornix https://github.com/microsoft/vscode/issues/139958
const openedEditor = utils.asPromise(vscode.window.onDidChangeVisibleNotebookEditors);
const resource = await utils.createRandomFile(undefined, undefined, '.nbdtest');
await vscode.window.showNotebookDocument(resource);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Kernel {
}

protected async _execute(cells: vscode.NotebookCell[]): Promise<void> {
for (let cell of cells) {
for (const cell of cells) {
await this._runCell(cell);
}
}
Expand Down Expand Up @@ -873,7 +873,7 @@ suite('Notebook API tests', function () {

});

test.skip('execution cancelled when delete while executing', async () => {
test('execution cancelled when delete while executing', async () => {
const document = await openRandomNotebookDocument();
const cell = document.cellAt(0);

Expand All @@ -891,9 +891,8 @@ suite('Notebook API tests', function () {
};
testDisposables.push(cancelledKernel.controller);

const notebook = await openRandomNotebookDocument();
await vscode.window.showNotebookDocument(notebook);
await assertKernel(cancelledKernel, notebook);
await vscode.window.showNotebookDocument(document);
await assertKernel(cancelledKernel, document);
await vscode.commands.executeCommand('notebook.cell.execute');

// Delete executing cell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ import { assertNoRpc, poll } from '../utils';
});
});

test('should have collection variables apply to environment variables that don\'t exist', async () => {
test.skip('should have collection variables apply to environment variables that don\'t exist', async () => {
// Setup collection and create terminal
const collection = extensionContext.environmentVariableCollection;
disposables.push({ dispose: () => collection.clear() });
Expand Down Expand Up @@ -798,7 +798,7 @@ import { assertNoRpc, poll } from '../utils';
});
});

test('should respect deleting entries', async () => {
test.skip('should respect deleting entries', async () => {
// Setup collection and create terminal
const collection = extensionContext.environmentVariableCollection;
disposables.push({ dispose: () => collection.clear() });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ suite('vscode API - webview', () => {
});


test('webviews should only be able to load resources from workspace by default', async () => {
test.skip('webviews should only be able to load resources from workspace by default', async () => { // TODO@mjbvz https://github.com/microsoft/vscode/issues/139960
const webview = _register(vscode.window.createWebviewPanel(webviewId, 'title', {
viewColumn: vscode.ViewColumn.One
}, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ import { assertNoRpc } from '../utils';
});
});

test('dependsOn task should start with a different processId (#118256)', async () => {
test.skip('dependsOn task should start with a different processId (#118256)', async () => {
// Set up dependsOn task by creating tasks.json since this is not possible via the API
// Tasks API
const tasksConfig = workspace.getConfiguration('tasks');
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "code-oss-dev",
"version": "1.64.0",
"distro": "1f70d5b8b91ef1ab0ebf90665d4222a0bf4bd979",
"distro": "553bb9d3803948fcccf1a35374942d8aba9c9c73",
"author": {
"name": "Microsoft Corporation"
},
Expand Down Expand Up @@ -78,11 +78,11 @@
"node-pty": "0.11.0-beta11",
"spdlog": "^0.13.0",
"tas-client-umd": "0.1.4",
"v8-inspect-profiler": "^0.0.22",
"v8-inspect-profiler": "^0.1.0",
"vscode-oniguruma": "1.6.1",
"vscode-proxy-agent": "^0.11.0",
"vscode-regexpp": "^3.1.0",
"vscode-ripgrep": "^1.12.1",
"vscode-ripgrep": "^1.13.2",
"vscode-textmate": "6.0.0",
"xterm": "4.16.0",
"xterm-addon-search": "0.9.0-beta.6",
Expand Down
2 changes: 1 addition & 1 deletion remote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"vscode-oniguruma": "1.6.1",
"vscode-proxy-agent": "^0.11.0",
"vscode-regexpp": "^3.1.0",
"vscode-ripgrep": "^1.12.1",
"vscode-ripgrep": "^1.13.2",
"vscode-textmate": "6.0.0",
"xterm": "4.16.0",
"xterm-addon-search": "0.9.0-beta.6",
Expand Down
8 changes: 4 additions & 4 deletions remote/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -547,10 +547,10 @@ vscode-regexpp@^3.1.0:
resolved "https://registry.yarnpkg.com/vscode-regexpp/-/vscode-regexpp-3.1.0.tgz#42d059b6fffe99bd42939c0d013f632f0cad823f"
integrity sha512-pqtN65VC1jRLawfluX4Y80MMG0DHJydWhe5ZwMHewZD6sys4LbU6lHwFAHxeuaVE6Y6+xZOtAw+9hvq7/0ejkg==

vscode-ripgrep@^1.12.1:
version "1.12.1"
resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.12.1.tgz#4a319809d4010ea230659ce605fddacd1e36a589"
integrity sha512-4edKlcXNSKdC9mIQmQ9Wl25v0SF5DOK31JlvKHKHYV4co0V2MjI9pbDPdmogwbtiykz+kFV/cKnZH2TgssEasQ==
vscode-ripgrep@^1.13.2:
version "1.13.2"
resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.13.2.tgz#8ccebc33f14d54442c4b11962aead163c55b506e"
integrity sha512-RlK9U87EokgHfiOjDQ38ipQQX936gWOcWPQaJpYf+kAkz1PQ1pK2n7nhiscdOmLu6XGjTs7pWFJ/ckonpN7twQ==
dependencies:
https-proxy-agent "^4.0.0"
proxy-from-env "^1.1.0"
Expand Down
4 changes: 4 additions & 0 deletions src/vs/base/browser/ui/sash/sash.css
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@
top: calc(50% - (var(--sash-hover-size) / 2));
}

.pointer-events-disabled {
pointer-events: none !important;
}

/** Debug **/

.monaco-sash.debug {
Expand Down
6 changes: 4 additions & 2 deletions src/vs/base/browser/ui/sash/sash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ class OrthogonalPointerEventFactory implements IPointerEventFactory {
}
}

const PointerEventsDisabledCssClass = 'pointer-events-disabled';

/**
* The {@link Sash} is the UI component which allows the user to resize other
* components. It's usually an invisible horizontal or vertical line which, when
Expand Down Expand Up @@ -493,7 +495,7 @@ export class Sash extends Disposable {

const iframes = getElementsByTagName('iframe');
for (const iframe of iframes) {
iframe.style.pointerEvents = 'none'; // disable mouse events on iframes as long as we drag the sash
iframe.classList.add(PointerEventsDisabledCssClass); // disable mouse events on iframes as long as we drag the sash
}

const startX = event.pageX;
Expand Down Expand Up @@ -558,7 +560,7 @@ export class Sash extends Disposable {
disposables.dispose();

for (const iframe of iframes) {
iframe.style.pointerEvents = 'auto';
iframe.classList.remove(PointerEventsDisabledCssClass);
}
};

Expand Down
7 changes: 7 additions & 0 deletions src/vs/base/common/lifecycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,13 @@ export class DisposableStore implements IDisposable {
this.clear();
}

/**
* Returns `true` if this object has been disposed
*/
public get isDisposed(): boolean {
return this._isDisposed;
}

/**
* Dispose of all registered disposables but do not mark this object as disposed.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/vs/base/common/linkedText.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class LinkedText {
}
}

const LINK_REGEX = /\[([^\]]+)\]\(((?:https?:\/\/|command:)[^\)\s]+)(?: ("|')([^\3]+)(\3))?\)/gi;
const LINK_REGEX = /\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: ("|')([^\3]+)(\3))?\)/gi;

export function parseLinkedText(text: string): LinkedText {
const result: LinkedTextNode[] = [];
Expand Down
4 changes: 2 additions & 2 deletions src/vs/base/common/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ export class TernarySearchTree<K, V> {
return new TernarySearchTree<URI, E>(new UriIterator(ignorePathCasing));
}

static forPaths<E>(): TernarySearchTree<string, E> {
return new TernarySearchTree<string, E>(new PathIterator());
static forPaths<E>(ignorePathCasing = false): TernarySearchTree<string, E> {
return new TernarySearchTree<string, E>(new PathIterator(undefined, !ignorePathCasing));
}

static forStrings<E>(): TernarySearchTree<string, E> {
Expand Down
41 changes: 41 additions & 0 deletions src/vs/base/node/extpath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,46 @@ export function realcaseSync(path: string): string | null {
return null;
}

export async function realcase(path: string): Promise<string | null> {
if (isLinux) {
// This method is unsupported on OS that have case sensitive
// file system where the same path can exist in different forms
// (see also https://github.com/microsoft/vscode/issues/139709)
return path;
}

const dir = dirname(path);
if (path === dir) { // end recursion
return path;
}

const name = (basename(path) /* can be '' for windows drive letters */ || path).toLowerCase();
try {
const entries = await Promises.readdir(dir);
const found = entries.filter(e => e.toLowerCase() === name); // use a case insensitive search
if (found.length === 1) {
// on a case sensitive filesystem we cannot determine here, whether the file exists or not, hence we need the 'file exists' precondition
const prefix = await realcase(dir); // recurse
if (prefix) {
return join(prefix, found[0]);
}
} else if (found.length > 1) {
// must be a case sensitive $filesystem
const ix = found.indexOf(name);
if (ix >= 0) { // case sensitive
const prefix = await realcase(dir); // recurse
if (prefix) {
return join(prefix, found[ix]);
}
}
}
} catch (error) {
// silently ignore error
}

return null;
}

export async function realpath(path: string): Promise<string> {
try {
// DO NOT USE `fs.promises.realpath` here as it internally
Expand Down Expand Up @@ -91,6 +131,7 @@ export function realpathSync(path: string): string {
// fs.realpath() is resolving symlinks and that can fail in certain cases. The workaround is
// to not resolve links but to simply see if the path is read accessible or not.
const normalizedPath = normalizePath(path);

fs.accessSync(normalizedPath, fs.constants.R_OK); // throws in case of an error

return normalizedPath;
Expand Down
10 changes: 9 additions & 1 deletion src/vs/base/node/pfs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,15 @@ async function rimrafMove(path: string): Promise<void> {
try {
const pathInTemp = randomPath(tmpdir());
try {
await Promises.rename(path, pathInTemp);
// Intentionally using `fs.promises` here to skip
// the patched graceful-fs method that can result
// in very long running `rename` calls when the
// folder is locked by a file watcher. We do not
// really want to slow down this operation more
// than necessary and we have a fallback to delete
// via unlink.
// https://github.com/microsoft/vscode/issues/139908
await fs.promises.rename(path, pathInTemp);
} catch (error) {
return rimrafUnlink(path); // if rename fails, delete without tmp dir
}
Expand Down
Loading

0 comments on commit f9ada96

Please sign in to comment.