chris-olszewski Github contribution chart
chris-olszewski Github Stats
chris-olszewski Most Used Languages

Activity

06 Dec 2022

Chris-olszewski

feature(turborepo): Port rest of CLI

Ports the rest of the CLI parsing to Rust. We now run all the commands by serializing the parsed args and repository state to json and passing it to Go code.

There's a few notes:

  • Args is currently the CLI parsing representation and the representation serialized to json and sent to Go. That's not ideal because the former is not well organized and has some redundancies. It's worth looking into splitting these two representations.
  • It seems like Go's dead code analysis is not the greatest, so I've been scanning through the codebase and deleting code that appears to be out of date. There might be some more stuff that needs to be deleted. Since this is not visible in the git diff, it might be tricky to spot.
  • Once this PR lands, I can probably land the version checking and shim-split PRs with less trouble. Note that the shim-split PR will probably reduce the size of main.rs, so if you find it difficult to read, know that the fix is coming soon.
  • The shell completion scripts are generated by clap now. I don't know how that changes them. Should we test this somehow?

Forked On 06 Dec 2022 at 12:52:10

Chris-olszewski

I completely missed the comment 🤦
On 06 Dec 2022 at 12:52:10

Chris-olszewski

feature(turborepo): Port rest of CLI

Ports the rest of the CLI parsing to Rust. We now run all the commands by serializing the parsed args and repository state to json and passing it to Go code.

There's a few notes:

  • Args is currently the CLI parsing representation and the representation serialized to json and sent to Go. That's not ideal because the former is not well organized and has some redundancies. It's worth looking into splitting these two representations.
  • It seems like Go's dead code analysis is not the greatest, so I've been scanning through the codebase and deleting code that appears to be out of date. There might be some more stuff that needs to be deleted. Since this is not visible in the git diff, it might be tricky to spot.
  • Once this PR lands, I can probably land the version checking and shim-split PRs with less trouble. Note that the shim-split PR will probably reduce the size of main.rs, so if you find it difficult to read, know that the fix is coming soon.
  • The shell completion scripts are generated by clap now. I don't know how that changes them. Should we test this somehow?

Merged On 06 Dec 2022 at 12:52:10

Chris-olszewski

Commented On 06 Dec 2022 at 12:52:10

Chris-olszewski

feature(turborepo): Port rest of CLI

Ports the rest of the CLI parsing to Rust. We now run all the commands by serializing the parsed args and repository state to json and passing it to Go code.

There's a few notes:

  • Args is currently the CLI parsing representation and the representation serialized to json and sent to Go. That's not ideal because the former is not well organized and has some redundancies. It's worth looking into splitting these two representations.
  • It seems like Go's dead code analysis is not the greatest, so I've been scanning through the codebase and deleting code that appears to be out of date. There might be some more stuff that needs to be deleted. Since this is not visible in the git diff, it might be tricky to spot.
  • Once this PR lands, I can probably land the version checking and shim-split PRs with less trouble. Note that the shim-split PR will probably reduce the size of main.rs, so if you find it difficult to read, know that the fix is coming soon.
  • The shell completion scripts are generated by clap now. I don't know how that changes them. Should we test this somehow?

Forked On 06 Dec 2022 at 12:50:00

Chris-olszewski

Unsure if that's the correct term for this, but whatever the opposite of a [phony target](https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html) is.
On 06 Dec 2022 at 12:50:00

Chris-olszewski

feature(turborepo): Port rest of CLI

Ports the rest of the CLI parsing to Rust. We now run all the commands by serializing the parsed args and repository state to json and passing it to Go code.

There's a few notes:

  • Args is currently the CLI parsing representation and the representation serialized to json and sent to Go. That's not ideal because the former is not well organized and has some redundancies. It's worth looking into splitting these two representations.
  • It seems like Go's dead code analysis is not the greatest, so I've been scanning through the codebase and deleting code that appears to be out of date. There might be some more stuff that needs to be deleted. Since this is not visible in the git diff, it might be tricky to spot.
  • Once this PR lands, I can probably land the version checking and shim-split PRs with less trouble. Note that the shim-split PR will probably reduce the size of main.rs, so if you find it difficult to read, know that the fix is coming soon.
  • The shell completion scripts are generated by clap now. I don't know how that changes them. Should we test this somehow?

Merged On 06 Dec 2022 at 12:50:01

Chris-olszewski

Commented On 06 Dec 2022 at 12:50:01

Chris-olszewski

bump timeout on jobs that need to build turborepo

Pushed On 05 Dec 2022 at 11:02:39

Chris-olszewski

feature(turborepo): Port rest of CLI

Ports the rest of the CLI parsing to Rust. We now run all the commands by serializing the parsed args and repository state to json and passing it to Go code.

There's a few notes:

  • Args is currently the CLI parsing representation and the representation serialized to json and sent to Go. That's not ideal because the former is not well organized and has some redundancies. It's worth looking into splitting these two representations.
  • It seems like Go's dead code analysis is not the greatest, so I've been scanning through the codebase and deleting code that appears to be out of date. There might be some more stuff that needs to be deleted. Since this is not visible in the git diff, it might be tricky to spot.
  • Once this PR lands, I can probably land the version checking and shim-split PRs with less trouble. Note that the shim-split PR will probably reduce the size of main.rs, so if you find it difficult to read, know that the fix is coming soon.
  • The shell completion scripts are generated by clap now. I don't know how that changes them. Should we test this somehow?

Merged On 05 Dec 2022 at 07:56:42

Chris-olszewski

After reading through this a third time I'm comfortable with stamping it. I think any issues that haven't been addressed in this PR can be followed up on in future PRs.

I see that a bunch of unrelated (docs site, turbopack) changes ended up getting into this PR and should be removed before merging.

Commented On 05 Dec 2022 at 07:56:42

Chris-olszewski

feature(turborepo): Port rest of CLI

Ports the rest of the CLI parsing to Rust. We now run all the commands by serializing the parsed args and repository state to json and passing it to Go code.

There's a few notes:

  • Args is currently the CLI parsing representation and the representation serialized to json and sent to Go. That's not ideal because the former is not well organized and has some redundancies. It's worth looking into splitting these two representations.
  • It seems like Go's dead code analysis is not the greatest, so I've been scanning through the codebase and deleting code that appears to be out of date. There might be some more stuff that needs to be deleted. Since this is not visible in the git diff, it might be tricky to spot.
  • Once this PR lands, I can probably land the version checking and shim-split PRs with less trouble. Note that the shim-split PR will probably reduce the size of main.rs, so if you find it difficult to read, know that the fix is coming soon.
  • The shell completion scripts are generated by clap now. I don't know how that changes them. Should we test this somehow?

Forked On 05 Dec 2022 at 07:39:35

Chris-olszewski

A quick comment explaining why this should never get hit would be good
On 05 Dec 2022 at 07:39:35

Chris-olszewski

feature(turborepo): Port rest of CLI

Ports the rest of the CLI parsing to Rust. We now run all the commands by serializing the parsed args and repository state to json and passing it to Go code.

There's a few notes:

  • Args is currently the CLI parsing representation and the representation serialized to json and sent to Go. That's not ideal because the former is not well organized and has some redundancies. It's worth looking into splitting these two representations.
  • It seems like Go's dead code analysis is not the greatest, so I've been scanning through the codebase and deleting code that appears to be out of date. There might be some more stuff that needs to be deleted. Since this is not visible in the git diff, it might be tricky to spot.
  • Once this PR lands, I can probably land the version checking and shim-split PRs with less trouble. Note that the shim-split PR will probably reduce the size of main.rs, so if you find it difficult to read, know that the fix is coming soon.
  • The shell completion scripts are generated by clap now. I don't know how that changes them. Should we test this somehow?

Merged On 05 Dec 2022 at 07:56:42

Chris-olszewski

After reading through this a third time I'm comfortable with stamping it. I think any issues that haven't been addressed in this PR can be followed up on in future PRs.

I see that a bunch of unrelated (docs site, turbopack) changes ended up getting into this PR and should be removed before merging.

Commented On 05 Dec 2022 at 07:56:42

Chris-olszewski

add build turbo GH action to use across workflows

Add a new action that correctly builds the shim on windows and switch over all workflows to use this so we only need to alter it in one place.

Didn't do any fancy passing of artifacts so we are building on every workflow, but hopefully this makes the PR cleaner.

Forked On 05 Dec 2022 at 07:52:49

Chris-olszewski

[Rustup is installed by default on GH Windows runners](https://github.com/actions/runner-images/blob/main/images/win/Windows2022-Readme.md#rust-tools). We don't use the setup action as it seems to respect the `rust-toolchain` a little too much and won't allow us to override the default host. Here's [a log](https://github.com/vercel/turbo/actions/runs/3597814367/jobs/6060047043#step:3:266) showing that this works.
On 05 Dec 2022 at 07:52:49

Chris-olszewski

add build turbo GH action to use across workflows

Add a new action that correctly builds the shim on windows and switch over all workflows to use this so we only need to alter it in one place.

Didn't do any fancy passing of artifacts so we are building on every workflow, but hopefully this makes the PR cleaner.

Merged On 05 Dec 2022 at 07:52:50

Chris-olszewski

Commented On 05 Dec 2022 at 07:52:50

Chris-olszewski

feature(turborepo): Port rest of CLI

Ports the rest of the CLI parsing to Rust. We now run all the commands by serializing the parsed args and repository state to json and passing it to Go code.

There's a few notes:

  • Args is currently the CLI parsing representation and the representation serialized to json and sent to Go. That's not ideal because the former is not well organized and has some redundancies. It's worth looking into splitting these two representations.
  • It seems like Go's dead code analysis is not the greatest, so I've been scanning through the codebase and deleting code that appears to be out of date. There might be some more stuff that needs to be deleted. Since this is not visible in the git diff, it might be tricky to spot.
  • Once this PR lands, I can probably land the version checking and shim-split PRs with less trouble. Note that the shim-split PR will probably reduce the size of main.rs, so if you find it difficult to read, know that the fix is coming soon.
  • The shell completion scripts are generated by clap now. I don't know how that changes them. Should we test this somehow?

Merged On 05 Dec 2022 at 07:18:52

Chris-olszewski

Commented On 05 Dec 2022 at 07:18:52

Chris-olszewski

feature(turborepo): Port rest of CLI

Ports the rest of the CLI parsing to Rust. We now run all the commands by serializing the parsed args and repository state to json and passing it to Go code.

There's a few notes:

  • Args is currently the CLI parsing representation and the representation serialized to json and sent to Go. That's not ideal because the former is not well organized and has some redundancies. It's worth looking into splitting these two representations.
  • It seems like Go's dead code analysis is not the greatest, so I've been scanning through the codebase and deleting code that appears to be out of date. There might be some more stuff that needs to be deleted. Since this is not visible in the git diff, it might be tricky to spot.
  • Once this PR lands, I can probably land the version checking and shim-split PRs with less trouble. Note that the shim-split PR will probably reduce the size of main.rs, so if you find it difficult to read, know that the fix is coming soon.
  • The shell completion scripts are generated by clap now. I don't know how that changes them. Should we test this somehow?

Forked On 05 Dec 2022 at 07:13:31

Chris-olszewski

Super nit, `take` is a generic enough of a function name, that keeping it qualified would be helpful for readability. ```suggestion if let Some(run_args) = mem::take(&mut clap_args.run_args) { ```
On 05 Dec 2022 at 07:13:31

Chris-olszewski

feature(turborepo): Port rest of CLI

Ports the rest of the CLI parsing to Rust. We now run all the commands by serializing the parsed args and repository state to json and passing it to Go code.

There's a few notes:

  • Args is currently the CLI parsing representation and the representation serialized to json and sent to Go. That's not ideal because the former is not well organized and has some redundancies. It's worth looking into splitting these two representations.
  • It seems like Go's dead code analysis is not the greatest, so I've been scanning through the codebase and deleting code that appears to be out of date. There might be some more stuff that needs to be deleted. Since this is not visible in the git diff, it might be tricky to spot.
  • Once this PR lands, I can probably land the version checking and shim-split PRs with less trouble. Note that the shim-split PR will probably reduce the size of main.rs, so if you find it difficult to read, know that the fix is coming soon.
  • The shell completion scripts are generated by clap now. I don't know how that changes them. Should we test this somehow?

Forked On 05 Dec 2022 at 07:07:25

Chris-olszewski

A comment explaining how `TURBO_BIN_PATH` is used during install and why us just checking if it's set is enough for us to know not to look for another binary. (I had to a knee jerk "this is wrong" reaction to this branch until I worked through the entire lifecycle in my head)
On 05 Dec 2022 at 07:07:25

Chris-olszewski

feature(turborepo): Port rest of CLI

Ports the rest of the CLI parsing to Rust. We now run all the commands by serializing the parsed args and repository state to json and passing it to Go code.

There's a few notes:

  • Args is currently the CLI parsing representation and the representation serialized to json and sent to Go. That's not ideal because the former is not well organized and has some redundancies. It's worth looking into splitting these two representations.
  • It seems like Go's dead code analysis is not the greatest, so I've been scanning through the codebase and deleting code that appears to be out of date. There might be some more stuff that needs to be deleted. Since this is not visible in the git diff, it might be tricky to spot.
  • Once this PR lands, I can probably land the version checking and shim-split PRs with less trouble. Note that the shim-split PR will probably reduce the size of main.rs, so if you find it difficult to read, know that the fix is coming soon.
  • The shell completion scripts are generated by clap now. I don't know how that changes them. Should we test this somehow?

Forked On 05 Dec 2022 at 06:57:50

Chris-olszewski

I feel like we should throw if the `current_dir` isn't valid utf8 instead of passing a lossy cwd to the Go code. Do we want to have `cwd` be an `OsString` so we can support non-utf8 systems? I know there was some discussion about our state of non-utf8 support and I'm unsure how it ended.
On 05 Dec 2022 at 06:57:50

Chris-olszewski

feature(turborepo): Port rest of CLI

Ports the rest of the CLI parsing to Rust. We now run all the commands by serializing the parsed args and repository state to json and passing it to Go code.

There's a few notes:

  • Args is currently the CLI parsing representation and the representation serialized to json and sent to Go. That's not ideal because the former is not well organized and has some redundancies. It's worth looking into splitting these two representations.
  • It seems like Go's dead code analysis is not the greatest, so I've been scanning through the codebase and deleting code that appears to be out of date. There might be some more stuff that needs to be deleted. Since this is not visible in the git diff, it might be tricky to spot.
  • Once this PR lands, I can probably land the version checking and shim-split PRs with less trouble. Note that the shim-split PR will probably reduce the size of main.rs, so if you find it difficult to read, know that the fix is coming soon.
  • The shell completion scripts are generated by clap now. I don't know how that changes them. Should we test this somehow?

Merged On 05 Dec 2022 at 07:18:52

Chris-olszewski

Commented On 05 Dec 2022 at 07:18:52

Chris-olszewski

use correct build target

Pushed On 05 Dec 2022 at 06:47:19

Chris-olszewski

add build turbo GH action to use across workflows

Created On 05 Dec 2022 at 06:33:43
Create Branch
Chris-olszewski In chris-olszewski/turborepo Create Brancholszewski/windows_ci_fix

Chris-olszewski

The High-performance Build System for JavaScript & TypeScript Codebases

On 05 Dec 2022 at 06:31:37

Chris-olszewski

day 4

Pushed On 05 Dec 2022 at 05:17:17
Create Branch

Chris-olszewski

Solutions for Advent of Code 2022

On 03 Dec 2022 at 09:07:24
Create Branch

Chris-olszewski

Solutions for Advent of Code 2022

On 03 Dec 2022 at 09:06:29

Chris-olszewski

feature(turborepo): Port rest of CLI

Ports the rest of the CLI parsing to Rust. We now run all the commands by serializing the parsed args and repository state to json and passing it to Go code.

There's a few notes:

  • Args is currently the CLI parsing representation and the representation serialized to json and sent to Go. That's not ideal because the former is not well organized and has some redundancies. It's worth looking into splitting these two representations.
  • It seems like Go's dead code analysis is not the greatest, so I've been scanning through the codebase and deleting code that appears to be out of date. There might be some more stuff that needs to be deleted. Since this is not visible in the git diff, it might be tricky to spot.
  • Once this PR lands, I can probably land the version checking and shim-split PRs with less trouble. Note that the shim-split PR will probably reduce the size of main.rs, so if you find it difficult to read, know that the fix is coming soon.
  • The shell completion scripts are generated by clap now. I don't know how that changes them. Should we test this somehow?

Forked On 02 Dec 2022 at 07:21:52

Chris-olszewski

A comment warning these need to be kept in sync with Rust is needed.
On 02 Dec 2022 at 07:21:52

Chris-olszewski

feature(turborepo): Port rest of CLI

Ports the rest of the CLI parsing to Rust. We now run all the commands by serializing the parsed args and repository state to json and passing it to Go code.

There's a few notes:

  • Args is currently the CLI parsing representation and the representation serialized to json and sent to Go. That's not ideal because the former is not well organized and has some redundancies. It's worth looking into splitting these two representations.
  • It seems like Go's dead code analysis is not the greatest, so I've been scanning through the codebase and deleting code that appears to be out of date. There might be some more stuff that needs to be deleted. Since this is not visible in the git diff, it might be tricky to spot.
  • Once this PR lands, I can probably land the version checking and shim-split PRs with less trouble. Note that the shim-split PR will probably reduce the size of main.rs, so if you find it difficult to read, know that the fix is coming soon.
  • The shell completion scripts are generated by clap now. I don't know how that changes them. Should we test this somehow?

Forked On 02 Dec 2022 at 07:28:14

Chris-olszewski

These are deprecated and we're pulling the trigger on removing them instead of porting them, correct?
On 02 Dec 2022 at 07:28:14

Chris-olszewski

feature(turborepo): Port rest of CLI

Ports the rest of the CLI parsing to Rust. We now run all the commands by serializing the parsed args and repository state to json and passing it to Go code.

There's a few notes:

  • Args is currently the CLI parsing representation and the representation serialized to json and sent to Go. That's not ideal because the former is not well organized and has some redundancies. It's worth looking into splitting these two representations.
  • It seems like Go's dead code analysis is not the greatest, so I've been scanning through the codebase and deleting code that appears to be out of date. There might be some more stuff that needs to be deleted. Since this is not visible in the git diff, it might be tricky to spot.
  • Once this PR lands, I can probably land the version checking and shim-split PRs with less trouble. Note that the shim-split PR will probably reduce the size of main.rs, so if you find it difficult to read, know that the fix is coming soon.
  • The shell completion scripts are generated by clap now. I don't know how that changes them. Should we test this somehow?

Forked On 02 Dec 2022 at 07:13:01

Chris-olszewski

```suggestion opts.runOpts.dryRunJSON = runPayload.DryRun == _dryRunJSONValue ```
On 02 Dec 2022 at 07:13:01

Chris-olszewski

feature(turborepo): Port rest of CLI

Ports the rest of the CLI parsing to Rust. We now run all the commands by serializing the parsed args and repository state to json and passing it to Go code.

There's a few notes:

  • Args is currently the CLI parsing representation and the representation serialized to json and sent to Go. That's not ideal because the former is not well organized and has some redundancies. It's worth looking into splitting these two representations.
  • It seems like Go's dead code analysis is not the greatest, so I've been scanning through the codebase and deleting code that appears to be out of date. There might be some more stuff that needs to be deleted. Since this is not visible in the git diff, it might be tricky to spot.
  • Once this PR lands, I can probably land the version checking and shim-split PRs with less trouble. Note that the shim-split PR will probably reduce the size of main.rs, so if you find it difficult to read, know that the fix is coming soon.
  • The shell completion scripts are generated by clap now. I don't know how that changes them. Should we test this somehow?

Forked On 02 Dec 2022 at 07:38:49

Chris-olszewski

I'm feeling a little icky about parts of the codebase depending on magic strings from Rust land, I don't see a good way to avoid it at this time though. Do you think it would be a good idea to try to contain some of the knowledge in this package where it's easier to contain the blast radius? I'm imagining that in `run.go` instead of having logic around checking if it's a dry run that could live here along with all of the magic strings: ```go func (r *RunPayload) IsDryRun() (bool, error) { if r.DryRun == "" { return false, nil } recognizedValue := r.DryRun == _dryRunTextValue || r.DryRun == _dryRunJSONValue || r.DryRun == _dryRunNoValue if !recognizedValue { return false, fmt.Errorf("invalid dry-run mode: %v", runPayload.DryRun) } return true, nil } ```
On 02 Dec 2022 at 07:38:49

Chris-olszewski

feature(turborepo): Port rest of CLI

Ports the rest of the CLI parsing to Rust. We now run all the commands by serializing the parsed args and repository state to json and passing it to Go code.

There's a few notes:

  • Args is currently the CLI parsing representation and the representation serialized to json and sent to Go. That's not ideal because the former is not well organized and has some redundancies. It's worth looking into splitting these two representations.
  • It seems like Go's dead code analysis is not the greatest, so I've been scanning through the codebase and deleting code that appears to be out of date. There might be some more stuff that needs to be deleted. Since this is not visible in the git diff, it might be tricky to spot.
  • Once this PR lands, I can probably land the version checking and shim-split PRs with less trouble. Note that the shim-split PR will probably reduce the size of main.rs, so if you find it difficult to read, know that the fix is coming soon.
  • The shell completion scripts are generated by clap now. I don't know how that changes them. Should we test this somehow?

Forked On 02 Dec 2022 at 07:21:27

Chris-olszewski

If we're going to be sharing magical strings between the Rust and Go we need to have some warning comments.
On 02 Dec 2022 at 07:21:27

Chris-olszewski

feature(turborepo): Port rest of CLI

Ports the rest of the CLI parsing to Rust. We now run all the commands by serializing the parsed args and repository state to json and passing it to Go code.

There's a few notes:

  • Args is currently the CLI parsing representation and the representation serialized to json and sent to Go. That's not ideal because the former is not well organized and has some redundancies. It's worth looking into splitting these two representations.
  • It seems like Go's dead code analysis is not the greatest, so I've been scanning through the codebase and deleting code that appears to be out of date. There might be some more stuff that needs to be deleted. Since this is not visible in the git diff, it might be tricky to spot.
  • Once this PR lands, I can probably land the version checking and shim-split PRs with less trouble. Note that the shim-split PR will probably reduce the size of main.rs, so if you find it difficult to read, know that the fix is coming soon.
  • The shell completion scripts are generated by clap now. I don't know how that changes them. Should we test this somehow?

Forked On 02 Dec 2022 at 07:08:20

Chris-olszewski

When would the Rust shim pass `runPayload.Graph == "true"`? Also not that I think this is an issue, but if a user wanted to output a graph to a file named `stdout` this would instead output to `stdout` (not the file) correct?
On 02 Dec 2022 at 07:08:20

Chris-olszewski

feature(turborepo): Port rest of CLI

Ports the rest of the CLI parsing to Rust. We now run all the commands by serializing the parsed args and repository state to json and passing it to Go code.

There's a few notes:

  • Args is currently the CLI parsing representation and the representation serialized to json and sent to Go. That's not ideal because the former is not well organized and has some redundancies. It's worth looking into splitting these two representations.
  • It seems like Go's dead code analysis is not the greatest, so I've been scanning through the codebase and deleting code that appears to be out of date. There might be some more stuff that needs to be deleted. Since this is not visible in the git diff, it might be tricky to spot.
  • Once this PR lands, I can probably land the version checking and shim-split PRs with less trouble. Note that the shim-split PR will probably reduce the size of main.rs, so if you find it difficult to read, know that the fix is coming soon.
  • The shell completion scripts are generated by clap now. I don't know how that changes them. Should we test this somehow?

Forked On 02 Dec 2022 at 06:56:54

Chris-olszewski

This clobbers the value set on line 105. We should combine the setting of this field.
On 02 Dec 2022 at 06:56:54

Chris-olszewski

feature(turborepo): Port rest of CLI

Ports the rest of the CLI parsing to Rust. We now run all the commands by serializing the parsed args and repository state to json and passing it to Go code.

There's a few notes:

  • Args is currently the CLI parsing representation and the representation serialized to json and sent to Go. That's not ideal because the former is not well organized and has some redundancies. It's worth looking into splitting these two representations.
  • It seems like Go's dead code analysis is not the greatest, so I've been scanning through the codebase and deleting code that appears to be out of date. There might be some more stuff that needs to be deleted. Since this is not visible in the git diff, it might be tricky to spot.
  • Once this PR lands, I can probably land the version checking and shim-split PRs with less trouble. Note that the shim-split PR will probably reduce the size of main.rs, so if you find it difficult to read, know that the fix is coming soon.
  • The shell completion scripts are generated by clap now. I don't know how that changes them. Should we test this somehow?

Merged On 02 Dec 2022 at 07:59:10

Chris-olszewski

I've gone through the Go section of the PR and it looks solid to me. My biggest worry is the sharing of constants between Rust and Go. I don't think it's avoidable, but we should have comments/structure the sharing in a way that encourages people to do the right thing.

Commented On 02 Dec 2022 at 07:59:10

Chris-olszewski

feature(turborepo): Port rest of CLI

Ports the rest of the CLI parsing to Rust. We now run all the commands by serializing the parsed args and repository state to json and passing it to Go code.

There's a few notes:

  • Args is currently the CLI parsing representation and the representation serialized to json and sent to Go. That's not ideal because the former is not well organized and has some redundancies. It's worth looking into splitting these two representations.
  • It seems like Go's dead code analysis is not the greatest, so I've been scanning through the codebase and deleting code that appears to be out of date. There might be some more stuff that needs to be deleted. Since this is not visible in the git diff, it might be tricky to spot.
  • Once this PR lands, I can probably land the version checking and shim-split PRs with less trouble. Note that the shim-split PR will probably reduce the size of main.rs, so if you find it difficult to read, know that the fix is coming soon.
  • The shell completion scripts are generated by clap now. I don't know how that changes them. Should we test this somehow?

Merged On 02 Dec 2022 at 07:59:10

Chris-olszewski

I've gone through the Go section of the PR and it looks solid to me. My biggest worry is the sharing of constants between Rust and Go. I don't think it's avoidable, but we should have comments/structure the sharing in a way that encourages people to do the right thing.

Commented On 02 Dec 2022 at 07:59:10