Skip to content
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

Add disambiguation of helpers (wrapping in round brackets) #504

Closed
mansona opened this issue Nov 23, 2023 · 7 comments · Fixed by #515
Closed

Add disambiguation of helpers (wrapping in round brackets) #504

mansona opened this issue Nov 23, 2023 · 7 comments · Fixed by #515
Assignees

Comments

@mansona
Copy link
Member

mansona commented Nov 23, 2023

No description provided.

@lolmaus
Copy link
Contributor

lolmaus commented Dec 7, 2023

So this has been fixed by #509.

The problem is that unambiguous helpers do not work in normal Ember! Demo:
https://stackblitz.com/edit/ember-cli-editor-output-evmggg?file=app%2Ftemplates%2Fapplication.hbs

It only works with Embroider and staticHelpers flag.

@AmilKey
Copy link

AmilKey commented Jan 11, 2024

@lolmaus maybe add a flag to ignore this(wrapping in round brackets) because it doesn't really work in a normal application

@lolmaus
Copy link
Contributor

lolmaus commented Jan 11, 2024

@AmilKey I was going to, but I think it has been decided that it was a bug in Ember and should be fixed in Ember.

@mansona Do you know the deets and status?

@AmilKey
Copy link

AmilKey commented Jan 11, 2024

@AmilKey I was going to, but I think it has been decided that it was a bug in Ember and should be fixed in Ember.

this error occurs in versions that are no longer supported, for example 3.28

@ef4
Copy link

ef4 commented Jan 16, 2024

It's probably not good for the codemod to do this at all. The parentheses are only required under certain narrow combinations of ember version, embroider version, and embroider settings. Both before and after you complete migration to embroider they're not needed (at least we think that's true if we address our bugs).

@ef4
Copy link

ef4 commented Jan 16, 2024

Maybe there's a separate issue with classic builds not supporting this syntax. If so that is a bug though and we should fix that too.

@samk1
Copy link

samk1 commented Jan 21, 2024

We're upgrading an Ember application from 3.4, one LTS at a time. Our ember templates are refusing to compile after applying this codemod since helper expression are getting round brackets. For example:

{{partial 'footer'}}

is becoming

{{(partial 'footer')}}

and that's refusing to compile - so being able to turn off this behavior would be helpful to us.

In fact, I might try a monkeypatch to do just that and see if that eases our upgrade path.

lolmaus added a commit to lolmaus/ember-angle-brackets-codemod that referenced this issue Feb 6, 2024
lolmaus added a commit to lolmaus/ember-angle-brackets-codemod that referenced this issue Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants