-
Notifications
You must be signed in to change notification settings - Fork 32
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
received command line args are empty when using --linker=legacy #82
Comments
This does not happen without |
On linux |
I believe this happens because we target musl for the release build, you can workaround this by building locally:
Change the platform in your roc file from:
To (adjust path for your basic-cli folder):
Build your app:
Now the platform is built, to prevent unnecessary rebuilding you can do:
To pass args (e.g. fileA.txt and fileB.txt) the syntax is:
|
The musl target was indeed the issue, this was fixed here and is available in rust 1.79, time to do some upgrading... |
This still happens with the basic-cli 0.12.0 pre-release which was built using rust 1.79 |
This could possibly be what is going on: https://roc.zulipchat.com/#narrow/channel/302903-platform-development/topic/getting.20args.20when.20using.20.60roc.20run.60.3F/near/477689098 |
Note: once we figure out a fix for this there's a test in the roc compiler repo that we can un-ignore. |
The weird thing is, this only happens when using a basic-cli release, not when building the platform from source.
We use the rust
args_os
function under the hood, in the docs it is mentioned that "The first element is traditionally the path of the executable, but it can be set to arbitrary text, and might not even exist. This means this property should not be relied upon for security purposes."The text was updated successfully, but these errors were encountered: