Skip to content

Update to Go 1.27 - #63902

Draft
Jake Bailey (jakebailey) wants to merge 11 commits into
microsoft:mainfrom
jakebailey:go1.27
Draft

Update to Go 1.27#63902
Jake Bailey (jakebailey) wants to merge 11 commits into
microsoft:mainfrom
jakebailey:go1.27

Conversation

@jakebailey

Copy link
Copy Markdown
Member

Lotsa goodies

Copilot AI balanced review requested due to automatic review settings August 20, 2026 10:04
@typescript-automation typescript-automation Bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Aug 20, 2026
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Aug 20, 2026
@jakebailey Jake Bailey (jakebailey) added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Aug 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the compiler and tooling to Go 1.27 and adopts its standard-library and modernization features.

Changes:

  • Raises Go requirements and refreshes dependencies/tooling.
  • Migrates to encoding/json/v2.
  • Applies Go 1.27 struct-literal and reverse-iteration simplifications.

Reviewed changes

Copilot reviewed 63 out of 65 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tsc/internal/tsoptions/tsconfigparsing.go Uses reverse-slice iteration.
tsc/internal/tsoptions/tsconfigparsing_test.go Simplifies embedded-field literals.
tsc/internal/tsoptions/contentmappers_test.go Simplifies mapper literals.
tsc/internal/transformers/estransforms/taggedtemplate.go Uses slices.Clip.
tsc/internal/testutil/contentmappertest/transforming.go Flattens result literals.
tsc/internal/testutil/contentmappertest/synthesizing.go Flattens result literals.
tsc/internal/testutil/contentmappertest/supplemental.go Flattens output literals.
tsc/internal/testutil/contentmappertest/supplemental_module.go Flattens supplemental outputs.
tsc/internal/testutil/contentmappertest/supplemental_globals.go Flattens supplemental outputs.
tsc/internal/testutil/contentmappertest/supplemental_diagnostics.go Flattens supplemental outputs.
tsc/internal/testutil/contentmappertest/mapper_test.go Simplifies mapper construction.
tsc/internal/testutil/contentmappertest/lisp.go Flattens result literals.
tsc/internal/testutil/contentmappertest/editing.go Flattens mapped outputs.
tsc/internal/testutil/contentmappertest/duplicate.go Flattens result literals.
tsc/internal/testutil/contentmappertest/component.go Flattens result literal.
tsc/internal/testutil/autoimporttestutil/fixtures.go Simplifies embedded file handle.
tsc/internal/pseudochecker/lookup.go Uses reverse-slice iteration.
tsc/internal/project/snapshotfs.go Simplifies disk-file literal.
tsc/internal/project/session.go Flattens resource requests.
tsc/internal/project/refcountcache_test.go Simplifies embedded-field literals.
tsc/internal/project/overlayfs.go Simplifies embedded file bases.
tsc/internal/project/logging/logcollector.go Flattens logger literal.
tsc/internal/project/dirty/syncmap.go Flattens map-entry literals.
tsc/internal/project/dirty/map.go Flattens map-entry literals.
tsc/internal/project/contentmapper_test.go Simplifies mapper fixtures.
tsc/internal/project/api.go Flattens resource request.
tsc/internal/printer/utilities.go Uses reverse-slice iteration.
tsc/internal/printer/changetrackerwriter.go Flattens writer literal.
tsc/internal/modulespecifiers/specifiers_test.go Flattens JSON-value literal.
tsc/internal/lsp/server.go Simplifies mapper construction.
tsc/internal/ls/symbols.go Uses reverse-slice iteration.
tsc/internal/ls/lsutil/formatcodeoptions.go Flattens default editor settings.
tsc/internal/ls/lsutil/children.go Uses reverse-slice iteration.
tsc/internal/ls/lsconv/converters.go Flattens mapped-span literal.
tsc/internal/ls/findallreferences.go Flattens position literal.
tsc/internal/ls/documenthighlights.go Uses reverse-slice iteration.
tsc/internal/ls/autoimport/registry_test.go Simplifies embedded fixture templates.
tsc/internal/ls/autoimport/extract.go Flattens export identifier.
tsc/internal/json/json.go Adopts standard encoding/json/v2.
tsc/internal/fswatch/watcher.go Modernizes rollback iteration.
tsc/internal/fourslash/test_parser.go Flattens location literal.
tsc/internal/fourslash/fourslash.go Modernizes reverse edit iteration.
tsc/internal/format/span.go Modernizes reverse rule iteration.
tsc/internal/format/format_test.go Flattens formatting settings.
tsc/internal/format/comment_test.go Flattens formatting fixtures.
tsc/internal/format/api_test.go Flattens formatting fixtures.
tsc/internal/execute/tsc/diagnostics.go Flattens path-formatting options.
tsc/internal/execute/incremental/buildinfo_contentmapper_test.go Simplifies mapper fixtures.
tsc/internal/core/core.go Modernizes reverse search helpers.
tsc/internal/contentmapper/transform_test.go Simplifies mapper fixtures.
tsc/internal/contentmapper/host_test.go Simplifies mapper and output fixtures.
tsc/internal/compiler/contentmapper_test.go Simplifies mapper fixture.
tsc/internal/checker/checker.go Modernizes reverse context lookup.
tsc/internal/astnav/tokens.go Modernizes reverse token lookup.
tsc/go.sum Refreshes compiler dependency checksums.
tsc/go.mod Requires Go 1.27 and updates dependencies.
tools/go.sum Refreshes tooling dependency checksums.
tools/go.mod Requires Go 1.27 and updates tooling.
tools/customlint/testdata/go.mod Updates custom-linter test module.
NOTICE.txt Updates dependency notices.
go.work Requires Go 1.27 workspace-wide.
CONTRIBUTING.md Documents Go 1.27 prerequisite.
.golangci.yml Enables new modernization and guards JSON v2.
.github/actions/setup-go/action.yml Installs Go 1.27 in CI.
.custom-gcl.yml Updates custom golangci-lint version.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread tsc/go.mod
Comment thread tsc/internal/fswatch/watcher.go Outdated
@github-project-automation github-project-automation Bot moved this from Not started to Needs merge in PR Backlog Aug 20, 2026
Comment thread .dprint.jsonc
},
"gofumpt": {
"langVersion": "go1.26",
"langVersion": "go1.27",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a new version that'll parse generic methods, but we need to wait a week for the npm quarantine.

It's probably best to wait anyway because linters are still getting bugfixes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged. I am leaving @jakebailey/dprint-plugin-gofumpt at 0.0.13 for now and will avoid adopting generic methods in this PR.

@jakebailey
Jake Bailey (jakebailey) marked this pull request as draft August 21, 2026 19:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 64 out of 79 changed files in this pull request and generated 2 comments.

Comment thread tsc/go.mod
module github.com/microsoft/TypeScript/tsc

go 1.26
go 1.27

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is not yet a published dev-1.27-bookworm image, so I added GOTOOLCHAIN=go1.27.0 to the devcontainer environment while retaining the Go 1.26 base image. This makes the temporary local toolchain choice explicit and reproducible.

Comment thread .golangci.yml
Comment on lines +4 to +6
"containerEnv": {
"GOTOOLCHAIN": "go1.27.0"
},

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly, the devcontainer is not out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Needs merge

Development

Successfully merging this pull request may close these issues.

3 participants