We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
argv[0]
Please put an X between the brackets as you perform the following steps:
The lean def main is passed arg[1] to argv[argc - 1].
def main
arg[1]
argv[argc - 1]
This is consistent with the behavior of Haskell's getArgs, but Lean does not provide haskell's getProgName.
getArgs
getProgName
IO.appPath is not a substitute for argv[0], as:
IO.appPath
exec
Zulip thread
foo
(exec -a secret_name ./lake/build/bin/foo)
Expected behavior: secret_name should either be in the first entry of args, or accessible via some IO API
secret_name
args
IO
Actual behavior: secret_name is lost forever:
lean4/src/Lean/Compiler/IR/EmitC.lean
Lines 173 to 182 in 01d414a
[Output of #eval Lean.versionString] [OS version, if not using live.lean-lang.org.]
#eval Lean.versionString
[Additional information, configuration or data that might be necessary to reproduce the issue]
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered:
main
Successfully merging a pull request may close this issue.
Prerequisites
Please put an X between the brackets as you perform the following steps:
https://github.com/leanprover/lean4/issues
Avoid dependencies to Mathlib or Batteries.
Test your test case against the latest nightly release, for example onhttps://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)
Description
The lean
def main
is passedarg[1]
toargv[argc - 1]
.This is consistent with the behavior of Haskell's
getArgs
, but Lean does not provide haskell'sgetProgName
.IO.appPath
is not a substitute forargv[0]
, as:argv[0]
contains the pre-resolved symlinksexec
can overrideargv[0]
arbitrarily.Context
Zulip thread
Steps to Reproduce
foo
(exec -a secret_name ./lake/build/bin/foo)
Expected behavior:
secret_name
should either be in the first entry ofargs
, or accessible via someIO
APIActual behavior:
secret_name
is lost forever:lean4/src/Lean/Compiler/IR/EmitC.lean
Lines 173 to 182 in 01d414a
Versions
[Output of
#eval Lean.versionString
][OS version, if not using live.lean-lang.org.]
Additional Information
[Additional information, configuration or data that might be necessary to reproduce the issue]
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered: