Skip to content

Commit ae6611f

Browse files
committed
Merge upstream/main - Fix porting bugs and completions
2 parents c9ab03a + e8a0920 commit ae6611f

File tree

15,073 files changed

+252093
-514071
lines changed

Some content is hidden

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

15,073 files changed

+252093
-514071
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.3.0
3+
version: v2.4.0
44

55
destination: ./_tools
66

.dprint.jsonc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"cwd": "${configDir}",
4242
"cacheKey": "4",
4343
"commands": [
44-
{ "command": "go tool mvdan.cc/gofumpt -lang=go1.24", "exts": ["go"] }
44+
{ "command": "go tool mvdan.cc/gofumpt -lang=go1.25", "exts": ["go"] }
4545
]
4646
},
4747
"excludes": [
@@ -59,7 +59,7 @@
5959
// Note: if adding new languages, make sure settings.template.json is updated too.
6060
// Also, if updating typescript, update the one in package.json.
6161
"plugins": [
62-
"https://plugins.dprint.dev/typescript-0.95.8.wasm",
62+
"https://plugins.dprint.dev/typescript-0.95.9.wasm",
6363
"https://plugins.dprint.dev/json-0.20.0.wasm",
6464
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.1.wasm",
6565
"https://plugins.dprint.dev/exec-0.5.1.json@492414e39dea4dccc07b4af796d2f4efdb89e84bae2bd4e1e924c0cc050855bf"

CONTRIBUTING.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Contributing
2+
3+
## How to Build and Run
4+
5+
This repo uses [Go 1.25 or higher](https://go.dev/dl/), [Rust 1.85 or higher](https://www.rust-lang.org/tools/install), [Node.js with npm](https://nodejs.org/), and [`hereby`](https://www.npmjs.com/package/hereby).
6+
7+
For tests and code generation, this repo contains a git submodule to the main TypeScript repo pointing to the commit being ported.
8+
When cloning, you'll want to clone with submodules:
9+
10+
```sh
11+
git clone --recurse-submodules https://github.com/microsoft/typescript-go.git
12+
```
13+
14+
If you have already cloned the repo, you can initialize the submodule with:
15+
16+
```sh
17+
git submodule update --init --recursive
18+
```
19+
20+
With the submodule in place and `npm ci`, you can run tasks via `hereby`, similar to the TypeScript repo:
21+
22+
```sh
23+
hereby build # Build the tsgo binary (not required for tests)
24+
hereby test # Run tests
25+
hereby format # Format the code
26+
hereby lint # Run linters
27+
hereby install-tools # Install additional tools such as linters
28+
hereby generate # Generate all Go code (e.g. diagnostics, committed to repo)
29+
```
30+
31+
Additional tasks are a work in progress.
32+
33+
`hereby` is not required to work on the repo; the regular `go` tooling (e.g., `go build`, `go test ./...`) will work as expected.
34+
`hereby` tasks are provided as a convenience for those familiar with the TypeScript repo.
35+
36+
### Running `tsgo`
37+
38+
After running `hereby build`, you can run `built/local/tsgo`, which behaves mostly the same as `tsc`.
39+
40+
### LSP Server
41+
42+
To debug and run the VS Code extension without installing it globally:
43+
44+
* Run VS Code in the repo workspace (`code .`)
45+
* Copy `.vscode/launch.template.json` to `.vscode/launch.json`
46+
* <kbd>F5</kbd> (or `Debug: Start Debugging` from the command palette)
47+
48+
This will launch a new VS Code instance which uses the Corsa LS as the backend. If correctly set up, you should see "tsgo" in the status bar when a TypeScript or JavaScript file is open:
49+
50+
![LSP Server Screenshot](.github/ls-screenshot.png)

0 commit comments

Comments
 (0)