-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[3.17.0 beta regression] Positional array arguments in helpers have changed in some cases #18779
Comments
This is most likely a bug in Edit: For context, the AST is not considered public API and changes like this are considered to be within semver. |
@pzuraq ah cool, thanks for the context. I'll close this issue then and open one over there. I'll see if I can put together a fix too. |
@pzuraq So I've dug into this and I'm reopening the issue because I'm actually not so sure this is a bug specific to So overall it seems like the AST is operating as expected. The AST is being converted to the following in ember 3.17.0-beta.6 if I put a breakpoint into the transform file. Note that Some other things I tried to try and figure out what is going on include:
So to put it mildly I'm a bit confused as to what's happening here 😅 Is there an order thing happening here where the |
There was a tricky issue with the AST transform. It appeared to be working, but it wasn't semantically the same output. Glimmer know cares about whether or not a value is a data property (an argument) or a path, and so the AST transform needs to take that into account. I updated your PR on |
Amazing, thank you 🙇 |
I've found an issue which was introduced with the Glimmer VM upgrade in v3.17.0-beta.1 . The only changelog item in that release is:
I found this issue through our use of
ember-simple-set-helper
. To reproduce we have the following code where we pass theset
action an object property to a child component and then set the property in the child:where
@user
is a simpleEmberObject
(in my app it's an Ember Data model).In ember-source v3.16.3 this works as expected and user is updated correctly. But from ember-source v3.17.0-beta.1 (and up to beta.6) this throws the following assertion from ember-simple-set-helper:
Looking at how the
{{set}}
works it appears that how thepositional
params are passed into the helper has changed, which I imagine is because of the glimmer-vm upgrade.v3.16.3
Here we see the first param in the
positional
array has extracted out the@user
target correctly.v3.17.0-beta.1
But here we see that the
@user
target is not extracted and isundefined
. This causes the helper to throw an assertion on the next line.I have a reproduction test in pzuraq/ember-simple-set-helper#5
/cc @pzuraq
The text was updated successfully, but these errors were encountered: