-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix(cli): ios dev
and ios build
support for bun
#10569
Conversation
Package Changes Through 028cffeThere are 6 changes which include tauri-build with prepatch, tauri-codegen with prerelease, tauri-utils with prerelease, tauri-cli with prerelease, @tauri-apps/cli with prerelease, tauri with prerelease Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
// so we must change working directory to the src-tauri folder to resolve the tauri dir | ||
if (var_os("npm_lifecycle_event").is_none() && var_os("PNPM_PACKAGE_NAME").is_none()) | ||
|| var("npm_config_user_agent").map_or(false, |agent| agent.starts_with("bun")) |
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.
should we remove this check and always set the directory?
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.
when using pnpm
npm
yarn
etc the CWD is automatically set to the app dir, so moving up two parents would crash it.
when using cargo or bun it'll actually be under gen/apple, and we can't resolve the tauri dir from there.. so we need this condition
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.
we could instead check if CWD ends with gen/apple
idk if it helps
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.
xcode-script
and android-script
are only valid if they are executed from a process that was launched by ios dev/build
or android dev/build
, right? ios dev/build
or android dev/build
could pass the app_dir using either the options mechanism we have or through an environment variable.
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.
also looking at
crate::helpers::app_paths::resolve(); |
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.
we can only resolve because we changed the CWD earlier..
to use the options we need to resolve the tauri config, which means we need to resolve the tauri dir too, so it doesn't help
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.
and xcode isn't a big fan of environment variables, plus if there's already an opened instance it wouldn't receive it
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.
alright, let's merge as is and hope it doesn't crash again.
I believe this may still be an issue. I changed the rust build phase of the Xcode project from |
No description provided.