Remove Corepack from extension build scripts - #17627
Closed
joperezr wants to merge 1 commit into
Closed
Conversation
Revert the Corepack-specific Yarn invocation added to the extension build so internal Azure Pipelines builds use the configured Yarn executable instead of downloading Yarn from the public registry. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17627Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17627" |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the VS Code extension build pipeline to stop using Corepack’s Yarn invocation and instead call yarn directly, avoiding Corepack’s attempt to download Yarn from the public registry in network-isolated build environments.
Changes:
- Replaced
corepack yarn@1.22.22 …with directyarn …invocations in the MSBuild extension packaging project. - Updated bash and PowerShell build scripts to check for
yarninstead ofcorepackand to runyarn install/yarn compiledirectly. - Updated error messaging to reflect the new prerequisite (Yarn on PATH).
Show a summary per file
| File | Description |
|---|---|
| extension/Extension.proj | Switches MSBuild exec steps from Corepack Yarn to direct yarn commands; updates prerequisite check/error text. |
| extension/build.sh | Replaces Corepack checks/invocations with yarn checks/invocations for install/compile. |
| extension/build.ps1 | Replaces Corepack checks/invocations with yarn checks/invocations for install/compile. |
Copilot's findings
- Files reviewed: 3/3 changed files
- Comments generated: 3
| <Error Condition="'$(YarnExitCode)' != '0'" Text="Corepack is not installed or cannot run Yarn Classic. To build the extension, install a Node.js version that includes Corepack." /> | ||
| <Error Condition="'$(YarnExitCode)' != '0'" Text="yarn is not installed or not available in PATH. To build the extension, install yarn: https://yarnpkg.com/getting-started/install" /> | ||
|
|
||
| <Message Importance="high" Text="yarn version: $(YarnVersion)" /> |
Comment on lines
+12
to
18
| # Check for yarn | ||
| if ! command -v yarn &> /dev/null; then | ||
| echo "Error: yarn is not installed. Please install yarn first." | ||
| echo "You can install yarn by running: npm install -g yarn" | ||
| exit 1 | ||
| fi | ||
|
|
| Write-Host "You can install yarn by running: npm install -g yarn" | ||
| exit 1 | ||
| } | ||
|
|
Member
Author
|
Closing in favor of the release/13.4-targeted PR: #17628 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Reverts the Corepack-specific Yarn invocation added to the VS Code extension build scripts.
Internal Azure Pipelines builds run with network isolation, and
corepack yarn@1.22.22attempts to download Yarn from the public Yarn registry before the extension's.yarnrcpackage registry configuration is used. That public download is blocked in internal builds. This change keeps the Yarn-only/frozen-lockfile restore path, but invokes the configuredyarnexecutable directly again so the build no longer depends on Corepack fetching Yarn from the public registry.Validation:
git diff --checkextension\Extension.projas XMLcorepackreferences remain in the targeted extension build filesFixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?