Skip to content

Commit c343dca

Browse files
committed
Merge branch 'main' into guyllian.gomez/yarn-pnp
2 parents 0665cd8 + b33ab79 commit c343dca

File tree

3,233 files changed

+39079
-21815
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,233 files changed

+39079
-21815
lines changed

.custom-gcl.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# yaml-language-server: $schema=https://golangci-lint.run/jsonschema/custom-gcl.jsonschema.json
22

3-
version: v2.5.0
3+
version: v2.6.2
44

55
destination: ./_tools
66

.devcontainer/devcontainer.json

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2-
// README at: https://github.com/devcontainers/templates/tree/main/src/universal
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/go
33
{
44
"name": "TypeScript Compiler Development",
55
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"image": "mcr.microsoft.com/devcontainers/universal:2-linux",
7-
6+
"image": "mcr.microsoft.com/devcontainers/go:2-1.25-bookworm",
87
// Features to add to the dev container. More info: https://containers.dev/features.
9-
// "features": {},
8+
"features": {
9+
"ghcr.io/devcontainers/features/node:1": {
10+
"version": "lts",
11+
"pnpmVersion": "latest",
12+
"nvmVersion": "latest"
13+
},
14+
"ghcr.io/devcontainers-extra/features/dprint-asdf:2": {
15+
"version": "latest"
16+
},
17+
"ghcr.io/devcontainers/features/rust:1": {}
18+
},
1019

1120
// Use 'forwardPorts' to make a list of ports inside the container available locally.
1221
// "forwardPorts": [],

.dprint.jsonc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@
5858
// Note: if adding new languages, make sure settings.template.json is updated too.
5959
// Also, if updating typescript, update the one in package.json.
6060
"plugins": [
61-
"https://plugins.dprint.dev/typescript-0.95.11.wasm",
62-
"https://plugins.dprint.dev/json-0.20.0.wasm",
61+
"https://plugins.dprint.dev/typescript-0.95.12.wasm",
62+
"https://plugins.dprint.dev/json-0.21.0.wasm",
6363
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.1.wasm",
6464
"https://plugins.dprint.dev/exec-0.6.0.json@a054130d458f124f9b5c91484833828950723a5af3f8ff2bd1523bd47b83b364"
6565
]

.github/actions/setup-go/action.yml

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ description: Setup Go
33

44
inputs:
55
go-version:
6-
description: Go version range to set up.
7-
default: '>=1.25.0'
6+
description: Go version to set up in go-install.ps1 format
7+
default: 'go1.25'
88
create:
99
description: Create the cache
1010
default: 'false'
@@ -18,19 +18,51 @@ runs:
1818
steps:
1919
- name: Install Go
2020
id: install-go
21-
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
22-
with:
23-
go-version: ${{ inputs.go-version }}
24-
cache: false
21+
shell: pwsh
22+
run: |
23+
# https://github.com/microsoft/go-infra/blob/main/goinstallscript/powershell/go-install.ps1
24+
${{ github.action_path }}/go-install.ps1 -Version ${{ inputs.go-version }} -GitHubActionsPath
25+
26+
$goVersionOutput = go version
27+
Write-Host $goVersionOutput
28+
# Extract version like "1.23.4" from "go version go1.23.4 windows/amd64"
29+
if ($goVersionOutput -match 'go version go([\d\.]+)') {
30+
$exactVersion = $matches[1]
31+
"go-version=$exactVersion" >> $env:GITHUB_OUTPUT
32+
Write-Host "Exact Go version: $exactVersion"
33+
} else {
34+
Write-Error "Failed to parse Go version from: $goVersionOutput"
35+
exit 1
36+
}
37+
38+
- name: Verify Microsoft Go
39+
shell: pwsh
40+
run: |
41+
$goPath = (Get-Command go).Source
42+
Write-Host "Go executable path: $goPath"
43+
if ($goPath -notlike "*microsoft-go*") {
44+
Write-Error "Go installation is not from microsoft-go. Path: $goPath"
45+
exit 1
46+
}
47+
Write-Host "✓ Verified: Microsoft Go is active"
48+
49+
- name: Add GOBIN to PATH
50+
shell: bash
51+
run: |
52+
GOBIN=$(go env GOBIN)
53+
if [ -z "$GOBIN" ]; then
54+
GOBIN="$(go env GOPATH)/bin"
55+
fi
56+
echo "$GOBIN" >> $GITHUB_PATH
2557
2658
# Avoid hardcoding the cache keys more than once.
2759
- name: Get cache info
2860
shell: bash
2961
id: cache-info
3062
env:
31-
MODULES_KEY: go-modules-${{ runner.os }}-${{ steps.install-go.outputs.go-version }}-${{ hashFiles('**/go.sum', '**/.custom-gcl.yml') }}
32-
LINT_KEY: golangci-lint-${{ runner.os }}-${{ steps.install-go.outputs.go-version }}-${{ hashFiles('**/go.sum', '**/.custom-gcl.yml') }}
33-
BUILD_KEY: go-build-cache-${{ runner.os }}-${{ steps.install-go.outputs.go-version }}
63+
MODULES_KEY: go-modules-${{ runner.os }}-msft-${{ steps.install-go.outputs.go-version }}-${{ hashFiles('**/go.sum', '**/.custom-gcl.yml') }}
64+
LINT_KEY: golangci-lint-${{ runner.os }}-msft-${{ steps.install-go.outputs.go-version }}-${{ hashFiles('**/go.sum', '**/.custom-gcl.yml') }}
65+
BUILD_KEY: go-build-cache-${{ runner.os }}-msft-${{ steps.install-go.outputs.go-version }}
3466
run: |
3567
echo "modules-key=$MODULES_KEY" >> $GITHUB_OUTPUT
3668
echo "lint-key=$LINT_KEY" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)