Skip to content

Commit bc3195e

Browse files
authored
Implement tsgo functionality in tsc, promote tsc to main entrypoint (#857)
1 parent c0c5840 commit bc3195e

29 files changed

+305
-553
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ Additional tasks are a work in progress.
4040

4141
### Running `tsgo`
4242

43-
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).
44-
This is mainly a testing entry point; for higher fidelity with regular `tsc`, run `tsgo tsc [flags]`, which behaves more similarly to `tsc`.
43+
After running `hereby build`, you can run `built/local/tsgo`, which behaves mostly the same as `tsc`.
4544

4645
### Running LSP Prototype
4746

_extension/src/extension.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,17 @@ export function activate(context: vscode.ExtensionContext) {
3737

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

4242
const serverOptions: ServerOptions = {
4343
run: {
4444
command: exe,
45-
args: ["lsp", ...pprofArgs],
45+
args: ["--lsp", ...pprofArgs],
4646
transport: TransportKind.stdio,
4747
},
4848
debug: {
4949
command: exe,
50-
args: ["lsp", ...pprofArgs],
50+
args: ["--lsp", ...pprofArgs],
5151
transport: TransportKind.stdio,
5252
},
5353
};

_packages/api/src/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class Client {
1515

1616
constructor(options: ClientOptions) {
1717
this.channel = new SyncRpcChannel(options.tsserverPath, [
18-
"api",
18+
"--api",
1919
"-cwd",
2020
options.cwd ?? process.cwd(),
2121
]);

cmd/tsgo/enablevtprocessing_other.go

Lines changed: 0 additions & 5 deletions
This file was deleted.

cmd/tsgo/enablevtprocessing_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"golang.org/x/sys/windows"
55
)
66

7-
func enableVirtualTerminalProcessing() {
7+
func init() {
88
h, err := windows.GetStdHandle(windows.STD_OUTPUT_HANDLE)
99
if err != nil || h == windows.InvalidHandle {
1010
return

cmd/tsgo/flag.go

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)