Skip to content

chore: remove old sourcemap search strategies #1724

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

Merged
merged 1 commit into from
Jun 9, 2023
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: 0 additions & 4 deletions OPTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<h5>Default value:</h4><pre><code>undefined</pre></code><h4>customPropertiesGenerator</h4><p>Customize the properties shown for an object in the debugger (local variables, etc...). Samples:<br> 1. { ...this, extraProperty: &#39;12345&#39; } // Add an extraProperty 12345 to all objects<br> 2. this.customProperties ? this.customProperties() : this // Use customProperties method if available, if not use the properties in this (the default properties)<br> 3. function () { return this.customProperties ? this.customProperties() : this } // Use customDescription method if available, if not return the default properties<br><br> Deprecated: This is a temporary implementation of this feature until we have time to implement it in the way described here: <a href="https://github.com/microsoft/vscode/issues/102181">https://github.com/microsoft/vscode/issues/102181</a></p>
<h5>Default value:</h4><pre><code>undefined</pre></code><h4>cwd</h4><p>Absolute path to the working directory of the program being debugged. If you&#39;ve set localRoot then cwd will match that value otherwise it falls back to your workspaceFolder</p>
<h5>Default value:</h4><pre><code>localRoot || ${workspaceFolder}</pre></code><h4>enableContentValidation</h4><p>Toggles whether we verify the contents of files on disk match the ones loaded in the runtime. This is useful in a variety of scenarios and required in some, but can cause issues if you have server-side transformation of scripts, for example.</p>
<h5>Default value:</h4><pre><code>true</pre></code><h4>enableTurboSourcemaps</h4><p>Configures whether to use a new, faster mechanism for sourcemap discovery</p>
<h5>Default value:</h4><pre><code>true</pre></code><h4>env</h4><p>Environment variables passed to the program. The value <code>null</code> removes the variable from the environment.</p>
<h5>Default value:</h4><pre><code>{}</pre></code><h4>envFile</h4><p>Absolute path to a file containing environment variable definitions.</p>
<h5>Default value:</h4><pre><code>null</pre></code><h4>localRoot</h4><p>Path to the local directory containing the program.</p>
Expand Down Expand Up @@ -64,7 +63,6 @@
<h5>Default value:</h4><pre><code>undefined</pre></code><h4>customPropertiesGenerator</h4><p>Customize the properties shown for an object in the debugger (local variables, etc...). Samples:<br> 1. { ...this, extraProperty: &#39;12345&#39; } // Add an extraProperty 12345 to all objects<br> 2. this.customProperties ? this.customProperties() : this // Use customProperties method if available, if not use the properties in this (the default properties)<br> 3. function () { return this.customProperties ? this.customProperties() : this } // Use customDescription method if available, if not return the default properties<br><br> Deprecated: This is a temporary implementation of this feature until we have time to implement it in the way described here: <a href="https://github.com/microsoft/vscode/issues/102181">https://github.com/microsoft/vscode/issues/102181</a></p>
<h5>Default value:</h4><pre><code>undefined</pre></code><h4>cwd</h4><p>Absolute path to the working directory of the program being debugged. If you&#39;ve set localRoot then cwd will match that value otherwise it falls back to your workspaceFolder</p>
<h5>Default value:</h4><pre><code>"${workspaceFolder}"</pre></code><h4>enableContentValidation</h4><p>Toggles whether we verify the contents of files on disk match the ones loaded in the runtime. This is useful in a variety of scenarios and required in some, but can cause issues if you have server-side transformation of scripts, for example.</p>
<h5>Default value:</h4><pre><code>true</pre></code><h4>enableTurboSourcemaps</h4><p>Configures whether to use a new, faster mechanism for sourcemap discovery</p>
<h5>Default value:</h4><pre><code>true</pre></code><h4>env</h4><p>Environment variables passed to the program. The value <code>null</code> removes the variable from the environment.</p>
<h5>Default value:</h4><pre><code>{}</pre></code><h4>envFile</h4><p>Absolute path to a file containing environment variable definitions.</p>
<h5>Default value:</h4><pre><code>null</pre></code><h4>killBehavior</h4><p>Configures how debug processes are killed when stopping the session. Can be:<br><br>- forceful (default): forcefully tears down the process tree. Sends SIGKILL on posix, or <code>taskkill.exe /F</code> on Windows.<br>- polite: gracefully tears down the process tree. It&#39;s possible that misbehaving processes continue to run after shutdown in this way. Sends SIGTERM on posix, or <code>taskkill.exe</code> with no <code>/F</code> (force) flag on Windows.<br>- none: no termination will happen.</p>
Expand Down Expand Up @@ -118,7 +116,6 @@
<h5>Default value:</h4><pre><code>undefined</pre></code><h4>customPropertiesGenerator</h4><p>Customize the properties shown for an object in the debugger (local variables, etc...). Samples:<br> 1. { ...this, extraProperty: &#39;12345&#39; } // Add an extraProperty 12345 to all objects<br> 2. this.customProperties ? this.customProperties() : this // Use customProperties method if available, if not use the properties in this (the default properties)<br> 3. function () { return this.customProperties ? this.customProperties() : this } // Use customDescription method if available, if not return the default properties<br><br> Deprecated: This is a temporary implementation of this feature until we have time to implement it in the way described here: <a href="https://github.com/microsoft/vscode/issues/102181">https://github.com/microsoft/vscode/issues/102181</a></p>
<h5>Default value:</h4><pre><code>undefined</pre></code><h4>cwd</h4><p>Absolute path to the working directory of the program being debugged. If you&#39;ve set localRoot then cwd will match that value otherwise it falls back to your workspaceFolder</p>
<h5>Default value:</h4><pre><code>localRoot || ${workspaceFolder}</pre></code><h4>enableContentValidation</h4><p>Toggles whether we verify the contents of files on disk match the ones loaded in the runtime. This is useful in a variety of scenarios and required in some, but can cause issues if you have server-side transformation of scripts, for example.</p>
<h5>Default value:</h4><pre><code>true</pre></code><h4>enableTurboSourcemaps</h4><p>Configures whether to use a new, faster mechanism for sourcemap discovery</p>
<h5>Default value:</h4><pre><code>true</pre></code><h4>env</h4><p>Environment variables passed to the program. The value <code>null</code> removes the variable from the environment.</p>
<h5>Default value:</h4><pre><code>{}</pre></code><h4>envFile</h4><p>Absolute path to a file containing environment variable definitions.</p>
<h5>Default value:</h4><pre><code>null</pre></code><h4>localRoot</h4><p>Path to the local directory containing the program.</p>
Expand Down Expand Up @@ -170,7 +167,6 @@
<h5>Default value:</h4><pre><code>localRoot || ${workspaceFolder}</pre></code><h4>debugWebviews</h4><p>Configures whether we should try to attach to webviews in the launched VS Code instance. This will only work in desktop VS Code.</p>
<h5>Default value:</h4><pre><code>false</pre></code><h4>debugWebWorkerHost</h4><p>Configures whether we should try to attach to the web worker extension host.</p>
<h5>Default value:</h4><pre><code>false</pre></code><h4>enableContentValidation</h4><p>Toggles whether we verify the contents of files on disk match the ones loaded in the runtime. This is useful in a variety of scenarios and required in some, but can cause issues if you have server-side transformation of scripts, for example.</p>
<h5>Default value:</h4><pre><code>true</pre></code><h4>enableTurboSourcemaps</h4><p>Configures whether to use a new, faster mechanism for sourcemap discovery</p>
<h5>Default value:</h4><pre><code>true</pre></code><h4>env</h4><p>Environment variables passed to the program. The value <code>null</code> removes the variable from the environment.</p>
<h5>Default value:</h4><pre><code>{}</pre></code><h4>envFile</h4><p>Absolute path to a file containing environment variable definitions.</p>
<h5>Default value:</h4><pre><code>null</pre></code><h4>localRoot</h4><p>Path to the local directory containing the program.</p>
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@
"main": "./src/extension.js",
"enabledApiProposals": [
"portsAttributes",
"findTextInFiles",
"workspaceTrust",
"tunnels"
],
Expand Down
19 changes: 3 additions & 16 deletions src/adapter/breakpointPredictor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ import { ILogger, LogTag } from '../common/logging';
import { fixDriveLetterAndSlashes, forceForwardSlashes } from '../common/pathUtils';
import { ISourceMapMetadata } from '../common/sourceMaps/sourceMap';
import { ISourceMapFactory } from '../common/sourceMaps/sourceMapFactory';
import {
ISearchStrategy,
ISearchStrategyFallback,
ISourcemapStreamOptions,
} from '../common/sourceMaps/sourceMapRepository';
import { ISearchStrategy, ISourcemapStreamOptions } from '../common/sourceMaps/sourceMapRepository';
import { ISourcePathResolver } from '../common/sourcePathResolver';
import { getOptimalCompiledPosition, parseSourceMappingUrl } from '../common/sourceUtils';
import * as urlUtils from '../common/urlUtils';
Expand Down Expand Up @@ -80,25 +76,16 @@ export class BreakpointPredictorCachedState<T> {

@injectable()
export abstract class BreakpointSearch {
private readonly repo: ISearchStrategy;

constructor(
@inject(AnyLaunchConfiguration) config: AnyLaunchConfiguration,
@inject(OutFiles) private readonly outFiles: OutFiles,
@inject(ISearchStrategy) repo: ISearchStrategy,
@inject(ISearchStrategyFallback) fallbackRepo: ISearchStrategy,
@inject(ISearchStrategy) private readonly repo: ISearchStrategy,
@inject(ILogger) protected readonly logger: ILogger,
@inject(ISourceMapFactory) private readonly sourceMapFactory: ISourceMapFactory,
@inject(ISourcePathResolver)
private readonly sourcePathResolver: ISourcePathResolver | undefined,
@inject(BreakpointPredictorCachedState)
private readonly state: BreakpointPredictorCachedState<unknown>,
) {
this.repo =
'enableTurboSourcemaps' in config && config.enableTurboSourcemaps === false
? fallbackRepo
: repo;
}
) {}

public abstract getMetadataForPaths(
sourcePaths: readonly string[],
Expand Down
5 changes: 0 additions & 5 deletions src/build/generate-contributions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,6 @@ const nodeBaseConfigurationAttributes: ConfigurationAttributes<INodeBaseConfigur
description: refString('node.versionHint.description'),
default: 12,
},
enableTurboSourcemaps: {
type: 'boolean',
default: true,
description: refString('node.enableTurboSourcemaps.description'),
},
};

/**
Expand Down
111 changes: 0 additions & 111 deletions src/common/sourceMaps/codeSearchStrategy.ts

This file was deleted.

95 changes: 0 additions & 95 deletions src/common/sourceMaps/nodeSearchStrategy.ts

This file was deleted.

Loading