-
Notifications
You must be signed in to change notification settings - Fork 720
Update README with current status, move contributing related info to CONTRIBUTING.md #1624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Contributing | ||
|
||
## How to Build and Run | ||
|
||
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). | ||
|
||
For tests and code generation, this repo contains a git submodule to the main TypeScript repo pointing to the commit being ported. | ||
When cloning, you'll want to clone with submodules: | ||
|
||
```sh | ||
git clone --recurse-submodules https://github.com/microsoft/typescript-go.git | ||
``` | ||
|
||
If you have already cloned the repo, you can initialize the submodule with: | ||
|
||
```sh | ||
git submodule update --init --recursive | ||
``` | ||
|
||
With the submodule in place and `npm ci`, you can run tasks via `hereby`, similar to the TypeScript repo: | ||
|
||
```sh | ||
hereby build # Build the tsgo binary (not required for tests) | ||
hereby test # Run tests | ||
hereby format # Format the code | ||
hereby lint # Run linters | ||
hereby install-tools # Install additional tools such as linters | ||
hereby generate # Generate all Go code (e.g. diagnostics, committed to repo) | ||
``` | ||
|
||
Additional tasks are a work in progress. | ||
|
||
`hereby` is not required to work on the repo; the regular `go` tooling (e.g., `go build`, `go test ./...`) will work as expected. | ||
`hereby` tasks are provided as a convenience for those familiar with the TypeScript repo. | ||
|
||
### Running `tsgo` | ||
|
||
After running `hereby build`, you can run `built/local/tsgo`, which behaves mostly the same as `tsc`. | ||
|
||
### LSP Server | ||
|
||
To debug and run the VS Code extension without installing it globally: | ||
|
||
* Run VS Code in the repo workspace (`code .`) | ||
* Copy `.vscode/launch.template.json` to `.vscode/launch.json` | ||
* <kbd>F5</kbd> (or `Debug: Start Debugging` from the command palette) | ||
|
||
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: | ||
|
||
 |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.