Skip to content

Commit e0df534

Browse files
jakebaileyCopilot
andauthored
Update README with current status, move contributing related info to CONTRIBUTING.md (#1624)
Co-authored-by: Copilot <[email protected]>
1 parent 41ced9a commit e0df534

File tree

2 files changed

+62
-62
lines changed

2 files changed

+62
-62
lines changed

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)

README.md

Lines changed: 12 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -21,75 +21,25 @@ To use this, set this in your VS Code settings:
2121
}
2222
```
2323

24-
## How to Build and Run
25-
26-
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).
27-
28-
For tests and code generation, this repo contains a git submodule to the main TypeScript repo pointing to the commit being ported.
29-
When cloning, you'll want to clone with submodules:
30-
31-
```sh
32-
git clone --recurse-submodules https://github.com/microsoft/typescript-go.git
33-
```
34-
35-
If you have already cloned the repo, you can initialize the submodule with:
36-
37-
```sh
38-
git submodule update --init --recursive
39-
```
40-
41-
With the submodule in place and `npm ci`, you can run tasks via `hereby`, similar to the TypeScript repo:
42-
43-
```sh
44-
hereby build # Verify that the project builds
45-
hereby test # Run all tests
46-
hereby install-tools # Install additional tools such as linters
47-
hereby lint # Run all linters
48-
hereby format # Format all code
49-
hereby generate # Generate all Go code (e.g. diagnostics, committed to repo)
50-
```
51-
52-
Additional tasks are a work in progress.
53-
54-
`hereby` is not required to work on the repo; the regular `go` tooling (e.g., `go build`, `go test ./...`) will work as expected.
55-
`hereby` tasks are provided as a convenience for those familiar with the TypeScript repo.
56-
57-
### Running `tsgo`
58-
59-
After running `hereby build`, you can run `built/local/tsgo`, which behaves mostly the same as `tsc`.
60-
61-
### Running LSP Prototype
62-
63-
To debug and run the VS Code extension without installing it globally:
64-
65-
* Run VS Code in the repo workspace (`code .`)
66-
* Copy `.vscode/launch.template.json` to `.vscode/launch.json`
67-
* <kbd>F5</kbd> (or `Debug: Start Debugging` from the command palette)
68-
69-
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:
70-
71-
![LSP Prototype Screenshot](.github/ls-screenshot.png)
72-
73-
7424
## What Works So Far?
7525

7626
This is still a work in progress and is not yet at full feature parity with TypeScript. Bugs may exist. Please check this list carefully before logging a new issue or assuming an intentional change.
7727

7828
| Feature | Status | Notes |
7929
|---------|--------|-------|
80-
| Program creation | done | Same files and module resolution as TS5.8. Not all resolution modes supported yet. |
81-
| Parsing/scanning | done | Exact same syntax errors as TS5.8 |
82-
| Commandline and `tsconfig.json` parsing | mostly done | Entry point slightly different for now |
83-
| Type resolution | done | Same types as TS5.8 |
84-
| Type checking | done | Same errors, locations, and messages as TS5.8. Types printback in errors may display differently (in progress) |
85-
| JavaScript-specific inference and JS Doc | not ready | - |
30+
| Program creation | done | Same files and module resolution as TS 5.8. Not all resolution modes supported yet. |
31+
| Parsing/scanning | done | Exact same syntax errors as TS 5.8 |
32+
| Commandline and `tsconfig.json` parsing | mostly done | Missing --help, --init. |
33+
| Type resolution | done | Same types as TS 5.8. |
34+
| Type checking | done | Same errors, locations, and messages as TS 5.8. Types printback in errors may display differently. |
35+
| JavaScript-specific inference and JSDoc | in progress | Mostly complete, but intentionally lacking some features. Declaration emit not complete. |
8636
| JSX | done | - |
87-
| Declaration emit | in progress | Most common features are in place, but some edge cases and feature flags are still unhandled |
88-
| Emit (JS output) | in progress | `target: esnext` well-supported, other targets may have gaps |
89-
| Watch mode | prototype | Watches files and rebuilds, but no incremental rechecking |
90-
| Build mode / project references | not ready | - |
91-
| Incremental build | not ready | - |
92-
| Language service (LSP) | prototype | Minimal functionality (errors, hover, go to def). More features coming soon |
37+
| Declaration emit | in progress | Most common features are in place, but some edge cases and feature flags are still unhandled. |
38+
| Emit (JS output) | in progress | `target: esnext` well-supported, other targets may have gaps. |
39+
| Watch mode | prototype | Watches files and rebuilds, but no incremental rechecking. Not optimized. |
40+
| Build mode / project references | done | - |
41+
| Incremental build | done | - |
42+
| Language service (LSP) | in progress | Some functionality (errors, hover, go to def, refs, sig help). More features coming soon. |
9343
| API | not ready | - |
9444

9545
Definitions:

0 commit comments

Comments
 (0)