Skip to content

Implement tsgo functionality in tsc, promote tsc to main entrypoint #857

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 13 commits into from
May 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ Additional tasks are a work in progress.

### Running `tsgo`

After running `hereby build`, you can run `built/local/tsgo`, which behaves mostly the same as `tsc` (respects tsconfig, but also prints out perf stats).
This is mainly a testing entry point; for higher fidelity with regular `tsc`, run `tsgo tsc [flags]`, which behaves more similarly to `tsc`.
After running `hereby build`, you can run `built/local/tsgo`, which behaves mostly the same as `tsc`.

### Running LSP Prototype

Expand Down
6 changes: 3 additions & 3 deletions _extension/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ export function activate(context: vscode.ExtensionContext) {

// Get pprofDir
const pprofDir = config.get<string>("pprofDir");
const pprofArgs = pprofDir ? ["-pprofDir", pprofDir] : [];
const pprofArgs = pprofDir ? ["--pprofDir", pprofDir] : [];

const serverOptions: ServerOptions = {
run: {
command: exe,
args: ["lsp", ...pprofArgs],
args: ["--lsp", ...pprofArgs],
transport: TransportKind.stdio,
},
debug: {
command: exe,
args: ["lsp", ...pprofArgs],
args: ["--lsp", ...pprofArgs],
transport: TransportKind.stdio,
},
};
Expand Down
2 changes: 1 addition & 1 deletion _packages/api/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class Client {

constructor(options: ClientOptions) {
this.channel = new SyncRpcChannel(options.tsserverPath, [
"api",
"--api",
"-cwd",
options.cwd ?? process.cwd(),
]);
Expand Down
5 changes: 0 additions & 5 deletions cmd/tsgo/enablevtprocessing_other.go

This file was deleted.

2 changes: 1 addition & 1 deletion cmd/tsgo/enablevtprocessing_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"golang.org/x/sys/windows"
)

func enableVirtualTerminalProcessing() {
func init() {
h, err := windows.GetStdHandle(windows.STD_OUTPUT_HANDLE)
if err != nil || h == windows.InvalidHandle {
return
Expand Down
44 changes: 0 additions & 44 deletions cmd/tsgo/flag.go

This file was deleted.

Loading