Consider promoting `@model` keyword-argument drop from `@warn` to `@error`
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
Research direction
Start at src/model_macro.jl:959-961 and compare the keyword-argument handling with the existing positional-argument error at model_macro.jl:923. Inspect the existing @model macro tests for unsupported arguments, then establish whether the intended behavior is an error; done means the chosen behavior is covered consistently by tests.
Written by the indexing model from the issue text.
Description
Summary
src/model_macro.jl:959-961: keyword arguments in a @model function signature are parsed
and then ignored, with only a warning:
if !isnothing(ms_kwargs) && length(ms_kwargs) > 0
@warn("Model specification language does not support keyword arguments. Ignoring $(length(ms_kwargs)) keyword arguments.")
end
Suggestion
A user writing @model function m(x; a=1) gets no a in the body; a later UndefVarError
is the only signal, and the @warn is easy to miss. Since unsupported positional
arguments already hard-error (model_macro.jl:923), consider promoting the kwarg case to an
error for consistency and earlier failure. Deliberate design choice — flagging for
discussion rather than a hard bug.
- Dominant language
- Julia
- Stars
- 46
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ReactiveBayes/GraphPPL.jl
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ReactiveBayes/GraphPPL.jl#310 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
ReactiveBayes/GraphPPL.jl#309 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ReactiveBayes/GraphPPL.jl#308 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 76/100
ReactiveBayes/GraphPPL.jl#306 ·
-
`@warn` in apply_constraints! throws `UndefVarError: opt` when a node already has a form constraint Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ReactiveBayes/GraphPPL.jl#305 ·
All issues in ReactiveBayes/GraphPPL.jl
Similar issues
-
tagbot-manual
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Sienna-Platform/PowerSystems.jl#1800 ·
-
enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100