Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

maybeEmitFakeConstructor considered harmful #82

Open
ditman opened this issue Mar 12, 2020 · 8 comments
Open

maybeEmitFakeConstructor considered harmful #82

ditman opened this issue Mar 12, 2020 · 8 comments

Comments

@ditman
Copy link
Contributor

ditman commented Mar 12, 2020

Generated fakeConstructor$ do not work and can't be called in dart2js, hence they probably shouldn't be generated anymore.

This should be removed.

@ditman
Copy link
Contributor Author

ditman commented Mar 12, 2020

cc/ @natebosch who knows way more about this than I do.

@ditman
Copy link
Contributor Author

ditman commented Mar 12, 2020

This is a PR where the autogenerated code had to be removed: flutter/plugins#2602

@natebosch
Copy link

I have never seen the errors this code claims to solve. @jacob314 - do you know the specifics? How can I repro?

My first preference would be to remove this altogether, I don't understand the problem it solves.

If we can't remove this altogether we can consider adding an external keyword.

@jacob314
Copy link
Contributor

they were never intended to be called. They were only around to placate the anlayzer for the hard to predict cases where you had a sublcass with a constructor but the base class didn't have the appropriate constructor. I forget the exact details.

@natebosch
Copy link

Let's drop them. I haven't seen a case where they are necessary. If someone complains we can revisit.

@jacob314
Copy link
Contributor

sgtm

@ditman
Copy link
Contributor Author

ditman commented Mar 12, 2020

I can get this done tomorrow. I think I'm one of the main users of the script for now :P

@jacob314
Copy link
Contributor

Happy to review any PR requests you send my way :)

timmaffett added a commit to timmaffett/js_facade_gen that referenced this issue Jul 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants