Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

Conversation

@atscott
Copy link
Collaborator

@atscott atscott commented May 20, 2021

Our extension does not support untrusted workspaces because it executes
ngcc from node_modules.

See microsoft/vscode#120251 for a description
of workspace trust and how to determine if an extension should support
untrusted workspaces.

Fixes #1322

@atscott atscott added the target: minor This PR is targeted for the next minor release label May 20, 2021
@google-cla google-cla bot added the cla: yes label May 20, 2021
@atscott atscott requested a review from kyliau May 20, 2021 20:21
@kyliau
Copy link
Contributor

kyliau commented May 20, 2021

According to microsoft/vscode#120251 (comment) if supported is false, then we should also add a description field to explain why.

@kyliau kyliau added the cleanup Cleanup needed before PR could be merged label May 20, 2021
Our extension does not support untrusted workspaces because it executes
ngcc from `node_modules`.

See microsoft/vscode#120251 for a description
of workspace trust and how to determine if an extension should support
untrusted workspaces.

Fixes angular#1322
@atscott atscott added action: merge Ready to merge and removed cleanup Cleanup needed before PR could be merged labels May 20, 2021
@TylerLeonhardt
Copy link

TylerLeonhardt commented May 21, 2021

Do you always pull ngcc from the node_modules in the workspace? If there is any fallback behavior of loading ngcc from the node_modules that ship in your extension, you could theoretically support the limited case.

I bring this up because it would be nice to have Go To Definition support for untrusted workspaces so folks can at least navigate with ease.

@atscott
Copy link
Collaborator Author

atscott commented May 25, 2021

@TylerLeonhardt We don't have a fallback for ngcc and it needs to run so that the Ivy compiler has metadata for the Angular libraries. Two other things to consider:

  • We won't need ngcc forever. With the release of ng-linker in v12, libraries are able to publish in an already Ivy-compatible way. There will be a point in the future when we can stop running ngcc completely but it'll be some time.
  • getProbeLocations was previously used to resolve ngdk from the workspace but we removed support for this in fb0b900. We'll need to remove the section of code there that adds workspace locations to the probe paths.
  • We could consider enabling the language service without running ngcc. This might be able to provide some amount of useful information in templates. I'll add this to our notes to discuss in our sync today.

@atscott atscott merged commit 7f7b53a into angular:master Jun 8, 2021
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge Ready to merge cla: yes target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Workspace Trust

3 participants