Skip to content
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

Improve dev experience on windows #5335

Open
wants to merge 50 commits into
base: main
Choose a base branch
from

Conversation

pierremtb
Copy link
Collaborator

@pierremtb pierremtb commented Feb 11, 2025

Adds the following scripts, and improves the readme for easier setup across platform.

yarn install:rust # new script for more consistency in how rust gets installed
yarn install:rust:windows
yarn install:wasm-pack:cargo # cargo install command for more consistency in how wasm-pack gets installed
yarn install:wasm-pack:sh # the old pre-build binaries script that doesn't work on all platorms
yarn install:tools:windows # for yq, jq, gh
yarn build:wasm:windows
yarn fetch:wasm:windows
yarn files:flip-to-nightly:windows # helps building a local nightly build with all the configs needed

Potential breaking change: wasm-pack no longer as npm package, since that isn't supported on some platforms like Windows ARM64. The yarn install:wasm-pack:cargo script compiles it with cargo and seems universal.

Copy link

qa-wolf bot commented Feb 11, 2025

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

Copy link

vercel bot commented Feb 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Feb 22, 2025 9:15pm

Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.02%. Comparing base (d78648f) to head (9fd693d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5335      +/-   ##
==========================================
- Coverage   86.04%   86.02%   -0.03%     
==========================================
  Files          95       95              
  Lines       35754    35754              
==========================================
- Hits        30766    30757       -9     
- Misses       4988     4997       +9     
Flag Coverage Δ
wasm-lib 86.02% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@franknoirot
Copy link
Collaborator

franknoirot commented Feb 13, 2025

Update: changing jq to jqlang.jq fixed the issue for me

I get the following error for the first script on my new laptop:

yarn install:tools:windows
yarn run v1.22.22
$ winget install Schniz.fnm jq yq
Multiple packages found matching input criteria. Please refine the input.
Name           Id           Source
-----------------------------------
JQuery参考手册 9NBLGGH4P48H msstore
jq             jqlang.jq    winget
Multiple packages found for: jq
error Command failed with exit code 2316632167.

package.json Outdated
@@ -84,8 +84,10 @@
"simpleserver:stop": "kill-port 3000",
"fmt": "prettier --write ./src *.ts *.json *.js ./e2e ./packages",
"fmt-check": "prettier --check ./src *.ts *.json *.js ./e2e ./packages",
"fetch:wasm": "./get-latest-wasm-bundle.sh",
"fetch:samples": "echo \"Fetching latest KCL samples...\" && curl -o public/kcl-samples-manifest-fallback.json https://raw.githubusercontent.com/KittyCAD/kcl-samples/achalmers/kw-pattern/manifest.json",
"install:tools:windows": "winget install Schniz.fnm jqlang.jq MikeFarah.yq",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey I could even add rustup in there looking at https://www.petergirnus.com/blog/how-to-install-rust-on-windows

winget is getting awesome

Copy link
Collaborator

@franknoirot franknoirot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are super helpful! I didn't test files:flip-to-nightly:windows because I'm not sure what it's used for. On a new machine, I had to first associate .ps1 files with Powershell in my settings; that seems more like a problem with Windows than us, don't know if it's worth documenting.

Oh and I don't know if updating jq to jqlang.jq works for you, but install:tools:windows didn't for me otherwise.

@pierremtb pierremtb marked this pull request as draft February 13, 2025 14:45
@pierremtb
Copy link
Collaborator Author

@franknoirot thanks so much for testing. Back to draft as there's a few more things I'd like to add, including a way to install wasm-pack and potentially rust in the first place too.

@pierremtb pierremtb changed the title Improve dev experience on windows WIP: Improve dev experience on windows Feb 15, 2025
@lf94
Copy link
Contributor

lf94 commented Feb 22, 2025

Can we merge this beauty

@pierremtb
Copy link
Collaborator Author

@lf94 if you're cool with it let's do it. @franknoirot 's approval is super old so I'd prefer a new one!

@lf94
Copy link
Contributor

lf94 commented Feb 22, 2025

We'll have to wait for Frank then since he uses Windows :) (I plan to migrate next week; going to order an SSD to transfer to and then do an install.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants