-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Replace shell scripts #325
Conversation
d9021f3
to
fbf71c5
Compare
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something broke in the rebase, but I'm otherwise satisfied with this iteration, and it seems to fix CI. (Once I fix it the rebase, can you retrigger ci a few more times to double check, @jfmengels?)
@jfmengels, ping :) (Oh, and can we squash merge this?) |
My IDE runs this on save, so I'm splitting out these changes.
But only run them in CI for now.
zx is a much simpler way to run commands. It's a much higher level library than child_process, so the code is much simpler to read. Length-wise, it's about the same, but slightly longer, primarily because Prettier wraps lists but not strings. I also converted the remaining bits of sync io to async io, as async io is only faster the more you use it. It also encourages function coloring, which makes it more explicit where there's io. (Yes, I know function coloring is generally a bad thing.)
8f008ad
to
0e582c8
Compare
This is a great step forward! Thank you @lishaduck 🎉 |
@lishaduck I think the |
Hm. Oh, yep. Added this to stop it from destroying my standing with gh while testing: Lines 453 to 455 in 7520c6b
It should be (!SUBCOMMAND || (...))
EDIT: No... hrg, logic. (If REMOTE is on or you're running record), turn it off (don't exit, keep running). ((If you're not in ci and are unauthenticated), turn it on (exit, don't keep running), but only if (REMOTE is off and you're not running record)). |
Begin working toward the goals in #176.
VERY WIP!!!
After all that work trying to fix the shell, I decided to just nuke it and get copilot to do a basic js rewrite, which exposed a bunch of bugs. This simplifies the code at a (likely) small speed decrease.
Eventually (not in this PR 🤞), I'd like to replace these with test cases in Jest; even more eventually, I'd like to quit spawning processes in Jest tests, which would allow us to mock the filesystem using
memfs
and go back to running stuff in parallel (and give a massive perf boost, tests have a lot of overhead right now).