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
Use jsdoc to mark APIs that don't work in the web extension host #101857
Comments
use |
Proposal for extending export interface ExtensionContext {
/**
* The uri of a directory in which the extension can create log files.
* The directory might not exist on disk and creation is up to the extension. However,
* the parent directory is guaranteed to be existent.
*
* @see vscode.workspace.fs
*/
readonly logUri: Uri;
/**
* The uri of a workspace specific directory in which the extension
* can store private state. The directory might not exist on disk and creation is
* up to the extension. However, the parent directory is guaranteed to be existent.
*
* Use [`workspaceState`](#ExtensionContext.workspaceState) or
* [`globalState`](#ExtensionContext.globalState) to store key value data.
*/
readonly storageUri: Uri | undefined;
/**
* The uri of a directory in which the extension can store global state.
* The directory might not exist on disk and creation is
* up to the extension. However, the parent directory is guaranteed to be existent.
*
* Use [`globalState`](#ExtensionContext.globalState) to store key value data.
*/
readonly globalStorageUri: Uri;
} |
Looks good to me. Should we mark the string version of these properties (including |
Yeah, somewhat a soft deprecation. All currently existing use-cases work still fine but future use-cases should use the URI variant. For |
Proposal for /**
* Executes a task that is managed by VS Code. The returned
* task execution can be used to terminate the task.
*
* *Note* that `executeTask` cannot execute ShellExecution and ProcessExecution
* tasks when running in an environment where a new process can't be started.
* In such an environment, only CustomExecution tasks can be run.
*
* @param task the task to execute
*/
export function executeTask(task: Task): Thenable<TaskExecution>; Proposal for /**
* Forwards a port. If the current resolver implements RemoteAuthorityResolver:forwardPort then that will be used to make the tunnel.
* By default, openTunnel only support localhost; however, RemoteAuthorityResolver:tunnelFactory can be used to support other ips.
*
* *Note* that `openTunnel` will throw an error when running in an environment without a remote.
*
* @param tunnelOptions The `localPort` is a suggestion only. If that port is not available another will be chosen.
*/
export function openTunnel(tunnelOptions: TunnelOptions): Thenable<Tunnel>; |
An extension would explicitly request this on the web worker extension before it tries to call
Should we use |
Isn't the terminal just a consumer of the env-collection and not the prereq? Looking at the API of |
@jrieken you're right that was the intent behind the design, I'll change it to be functional but currently it won't actually do anything. |
Yeah, I think it's good if it's read/write only, e.g being consumable by extensions that wanna do something with it |
I like 👍 |
@jrieken done my bits |
👏 ideas what to do with |
I have pushed another change that turned the errors into |
We have a few APIs that don't make sense in the web extension host and we should mark then clear, one sample is
ExtensionContent#globalStoragePath
which is spec'd to be a file path. We should find graceful fallbacks, using default values, or throwExtensionContext.environmentVariableCollection
env.shell
env.appRoot
window.createTerminal
task.executeTask
workspace.openTunnel
_workbench.downloadResource
The text was updated successfully, but these errors were encountered: