fix: setting undeclared argument was done with nil key - #2925
Open
Rutgerdj wants to merge 2 commits into
Open
Conversation
zachdaniel
reviewed
Sep 10, 2026
| @@ -6612,29 +6612,33 @@ defmodule Ash.Changeset do | |||
|
|
|||
| defp do_set_argument(changeset, argument, value, store_casted? \\ false) do | |||
Contributor
There was a problem hiding this comment.
🤔 I didn't even realize we stored undefined arguments. We shouldn't be putting these into the arguments at all. Could we make that change instead?
Contributor
Author
There was a problem hiding this comment.
Good point, I just thought this was undocumented bahaviour :D
I've updated the logic to attach an error to the Changeset. Thats a breaking change tho. Before it failed silently, now it fails loudly.
That causes a Reactor test (test/reactor/change_test.exs:44) to fail.
I've had our shared friend take a look at it but couldn't confidently review it's suggestions so leaving this open.
Rutgerdj
force-pushed
the
bugs/missing-argument-set-on-changeset
branch
from
September 11, 2026 13:16
0c979d1 to
7ebec67
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Setting an argument on the changeset that is not defined by the action put the value in the arguments map with a
nilkey.This was caused by the
argumentvariable being reassignedContributor checklist
Leave anything that you believe does not apply unchecked.