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? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Describe the bug Using optional optional types from Configurations fails with an error.
Version of the package: 1.0.0, julia 1.8.3
To Reproduce
module M using Comonicon using Configurations @option struct Opts x::String = "x" end """ # Options - `-c, --config <path/to/option/or/specific field>`: config. """ @main function main(;config::Opts=Opts()) @show config end end M.command_main()
ERROR: KeyError: key :config not found Stacktrace: [1] getindex(h::Dict{Symbol, Any}, key::Symbol) @ Base ./dict.jl:498 [2] command_main(ARGS::Vector{String}) @ Main.M ~/.julia/dev/Comonicon/src/codegen/julia.jl:277 [3] command_main() @ Main.M ~/.julia/dev/Comonicon/src/codegen/julia.jl:90 [4] top-level scope @ REPL[2]:1
Expected behavior The function should show config = Main.M.Opts("x")
config = Main.M.Opts("x")
Reason Accessing kwargs in emit_leaf_call assumes that the option was already stored, which happens only for required options (afaik).
kwargs
emit_leaf_call
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
Using optional optional types from Configurations fails with an error.
Version of the package:
1.0.0, julia 1.8.3
To Reproduce
Expected behavior
The function should show
config = Main.M.Opts("x")
Reason
Accessing
kwargs
inemit_leaf_call
assumes that the option was already stored, which happens only for required options (afaik).The text was updated successfully, but these errors were encountered: