Running clerk/upgrade on a directory with binary files causes the scan to stall.
NOTE: This could be reproduced in any monorepo that produce binary build files, but here we're just gonna use tauri-plugin-clerk.
Clone the repo:
> git clone https://github.com/Nipsuli/tauri-plugin-clerk.git tmp
Cloning into 'tmp'...
remote: Enumerating objects: 510, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 510 (delta 2), reused 7 (delta 2), pack-reused 495 (from 1)
Receiving objects: 100% (510/510), 666.58 KiB | 1.64 MiB/s, done.
Resolving deltas: 100% (252/252), done.Switch to the react-example directory:
> cd tmp/examples/react-example/Run the backend cargo build (just to produce some build files)
> cd src-tauri && cargo build
Updating crates.io index
Locking 576 packages to latest compatible versions
Adding generic-array v0.14.7 (available: v0.14.9)
Adding toml v0.8.2 (available: v0.8.23)
Adding toml_datetime v0.6.3 (available: v0.6.11)
Adding toml_edit v0.20.2 (available: v0.20.7)
Compiling proc-macro2 v1.0.106
Compiling unicode-ident v1.0.24
Compiling quote v1.0.45
Compiling libc v0.2.185
Compiling cfg-if v1.0.4
Compiling itoa v1.0.18
...
Compiling open v5.3.3
Compiling react-example v0.1.0 (/Users/rory/repos/tauri-plugin-clerk/tmp/examples/react-example/src-tauri)
Compiling clerk-fapi-rs v0.2.0
error: environment variable `CLERK_PUBLISHABLE_KEY` not defined at compile time
--> src/lib.rs:4:36
|
4 | pub const CLERK_PUBLIC_KEY: &str = env!("CLERK_PUBLISHABLE_KEY");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `std::env::var("CLERK_PUBLISHABLE_KEY")` to read the variable at run time
error: could not compile `react-example` (lib) due to 1 previous errorThe error doesn't matter, now switch back and run clerk/upgrade --dry-run.
> cd ..
> time bun x @clerk/upgrade --dry-run
█▀▀ █ █▀▀ █▀█ █▄▀ █ █ █▀█ █▀▀ █▀█ ▄▀█ █▀▄ █▀▀
█▄▄ █▄▄ ██▄ █▀▄ █ █ █▄█ █▀▀ █▄█ █▀▄ █▀█ █▄▀ ██▄
Hello friend! We're excited to help you upgrade Clerk modules. Before we get started, a couple
questions...
⚠ Upgrade running in dry run mode - no changes will be made
🔧 Upgrade config
Clerk SDK: @clerk/react (v5)
Upgrade: v5 → v6 (Core 3)
Directory: /Users/rory/repos/tauri-plugin-clerk/tmp/examples/react-example
Package manager: npm
Ready to upgrade? (Y/n):
[dry run] Would upgrade @clerk/react to version 6
[dry run] Would remove old package @clerk/clerk-react
Running 13 codemod(s)...
✓ Codemod applied: transform-clerk-react-v6
0 file(s) modified
✓ Codemod applied: transform-remove-deprecated-props
0 file(s) modified
✓ Codemod applied: transform-remove-deprecated-appearance-props
0 file(s) modified
✓ Codemod applied: transform-appearance-layout-to-options
0 file(s) modified
✓ Codemod applied: transform-themes-to-ui-themes
0 file(s) modified
✓ Codemod applied: transform-clerk-types-to-shared-types
0 file(s) modified
✓ Codemod applied: transform-align-experimental-unstable-prefixes
0 file(s) modified
✓ Codemod applied: transform-protect-to-show
0 file(s) modified
✓ Codemod applied: transform-satellite-auto-sync
0 file(s) modified
✓ Codemod applied: transform-internal-clerk-js-ui-props
0 file(s) modified
✅ All codemods applied
Scanning for additional breaking changes...
⠏ Scanning libclerk_fapi_rs-9952e92c1e332607.rlib (565/1956)^C1956)cgu.2.rcgu.o (472/1956)08/1956)6)
________________________________________________________
Executed in 38.07 secs fish external
usr time 40.37 secs 0.36 millis 40.37 secs
sys time 2.56 secs 2.28 millis 2.56 secsAbove command needed to be manually killed with ctrl+c. Delete the target directory and everything works normally.
> rm -rf src-tauri/target/debug
> time bun x @clerk/upgrade --dry-run
█▀▀ █ █▀▀ █▀█ █▄▀ █ █ █▀█ █▀▀ █▀█ ▄▀█ █▀▄ █▀▀
█▄▄ █▄▄ ██▄ █▀▄ █ █ █▄█ █▀▀ █▄█ █▀▄ █▀█ █▄▀ ██▄
Hello friend! We're excited to help you upgrade Clerk modules. Before we get started, a couple
questions...
⚠ Upgrade running in dry run mode - no changes will be made
🔧 Upgrade config
Clerk SDK: @clerk/react (v5)
Upgrade: v5 → v6 (Core 3)
Directory: /Users/rory/repos/tauri-plugin-clerk/tmp/examples/react-example
Package manager: npm
Ready to upgrade? (Y/n):
[dry run] Would upgrade @clerk/react to version 6
[dry run] Would remove old package @clerk/clerk-react
Running 13 codemod(s)...
✓ Codemod applied: transform-clerk-react-v6
0 file(s) modified
✓ Codemod applied: transform-remove-deprecated-props
0 file(s) modified
✓ Codemod applied: transform-remove-deprecated-appearance-props
0 file(s) modified
✓ Codemod applied: transform-appearance-layout-to-options
0 file(s) modified
✓ Codemod applied: transform-themes-to-ui-themes
0 file(s) modified
✓ Codemod applied: transform-clerk-types-to-shared-types
0 file(s) modified
✓ Codemod applied: transform-align-experimental-unstable-prefixes
0 file(s) modified
✓ Codemod applied: transform-protect-to-show
0 file(s) modified
✓ Codemod applied: transform-satellite-auto-sync
0 file(s) modified
✓ Codemod applied: transform-internal-clerk-js-ui-props
0 file(s) modified
✅ All codemods applied
Scanning for additional breaking changes...
✓ Scanned 23 files
Found 2 potential issue(s) to review:
Sign-in Client Trust status handling
Found 0 instance(s):
→ View in migration guide: https://clerk.com/docs/guides/development/upgrading/upgrade-guides/core-3#needs-client-trust-sign-in-status-added
`@clerk/clerk-react` renamed to `@clerk/react`
Found 2 instance(s):
package.json:13:6
src/App.tsx:10:9
→ View in migration guide: https://clerk.com/docs/guides/development/upgrading/upgrade-guides/core-3#clerk-react-rename
✅ Upgrade complete for @clerk/react
Review the changes above and test your application before deployment.
For more information, see the migration guide: https://clerk.com/docs/guides/development/upgrading/upgrade-guides/core-3
________________________________________________________
Executed in 3.77 secs fish external
usr time 5.83 secs 0.42 millis 5.83 secs
sys time 1.47 secs 2.37 millis 1.47 secsIssues:
- Scan work for
**/*with only specific directories excluded - The scan spinner only shows the filename rather than path
- No binary file detection
- (Optional) It'd be nice if the scan used a
.gitignorefile to reduce the scanning scope.