-
Notifications
You must be signed in to change notification settings - Fork 143
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
How do I enable private methods? #979
Comments
I can't reproduce this. I tested private fields working in both an app and an addon. Maybe you have old dependencies (like a |
I re-rolled the lockfile and got the same issue: https://github.com/NullVoxPopuli/ember-array-map-resource/pull/106/checks?check_run_id=3714144862#step:5:215 I think the issue is more private methods rather than private fields -- I'm surprised these are different implementation-wise in Babel. But yeah, private fields already work just fine. What's goofy is that private methods are natively supported, though, my targets currently include safari: https://github.com/NullVoxPopuli/ember-array-map-resource/blob/main/config/targets.js#L3 I wonder if that's why transpilation is even occurring. I've added a private getter here: https://github.com/embroider-build/embroider/pull/982/files to see if the test suite passes with this addition |
ember-cli-babel has private methods here: https://github.com/babel/ember-cli-babel/blob/085c408b88a058bdbcaa298a5e59c9511e832073/lib/babel-options-util.js#L403 I searched embroider for |
Been running into this as well. Discovered So I believe the solution is to migrate from |
@courajs - I don't think we are using that dep at all actually... |
I believe this is the same thing I described in emberjs/ember-cli-babel#419 (comment), since we use ember-cli-babel for compilation still we're going to have the same issue. |
I suspect this is fixed by emberjs/ember-cli-babel#420 |
I'll double check real quick |
I ran in to a separate issue, |
ok, too much going on here, there is the minimal test: and it succeeded! yay! |
I'm surprised they aren't enabled by default? because ember-cli-babel has them 🙃
but anywho, I have this error in C.I.: https://github.com/NullVoxPopuli/ember-array-map-resource/pull/103/checks?check_run_id=3702630696#step:5:215
Classic build works just fine with private fields: https://github.com/NullVoxPopuli/ember-array-map-resource/pull/103/checks?check_run_id=3702630588
The text was updated successfully, but these errors were encountered: