-
Notifications
You must be signed in to change notification settings - Fork 4.1k
THRIFT-5234 Fix a number of js/ts generation issues #1855
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
Conversation
pprice
commented
Aug 25, 2019
- [js] Missing class name for generated services and processors; this makes instrumentation of outbound calls (e.g. which service are we calling in to) difficult. Generating a class name for es6 enables x.constructor.name to get generated name.
- [js] Fix case where services have a method with an argument named "params", generated code generates an identifier in the "send_XXX" body named "params" which conflicts with the argument. Ensure the identifier in the body is uniquely named.
- [js] Ensure that derived services (extends XYZService) correctly call super() in their constructor.
- [ts] Ensure that derived services (extends XYZSerice) correctly specify the base class Client and Processor name
- [js] Ensure that derived service clients do not redefine private fields (output, pClass, _seqId, _reqs) and call super();
- [ts] Ensure derived service clients and processors do not redefine private fields in declaration.
|
I found this error : "Must call super constructor in derived class before accessing 'this' or returning from derived constructor" when I am using thrift es6. |
|
@wadeDra does your service derive from another service? E.g. FWIW the approach I took for my local build process, was to write codemods / replacements to fix up the output until I could get this landed. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
|
Dear @pprice , your PR seems valuable, could you make further progress with the travis checks? If not, do you want to try and split it into smaller logical chunks? This can help isolate what breaks travis and maybe move ahead with the other parts more quickly? |
|
This issue is no longer stale. Thank you for your contributions. |
|
any progress? |
|
@emmenlau Let me look at this over the next couple of days. The travis failure did seem unrelated, but I'm happy to break it up if we can get some traction on merging the changes in. |
|
Travis failures are indeed unrelated. @pprice can you rebase from master? Also some tests would be nice. |
Jens-G
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Travis failures are indeed unrelated. @pprice can you rebase from master? Also some tests would be nice.
|
Rebased; let's give this a whirl |
|
@Jens-G; CI failed again; I dug through the logs for errors; again appear to be unrelated, 3 fail for the same reason (python upgrade needed?), and 1 for either a cert error or a missing ruby gem? 6172.3, 6172.4, 6172.56172.9 |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
|
Dear stale bot, please keep this issue open! |
|
This issue is no longer stale. Thank you for your contributions. |
|
Theoretically we have a clean CI. Could you rebase this? |
|
Let's give this another try. May I ask to rebase and force-push again? |
|
Ping |
- [js] Missing class name for generated services and processors; this makes instrumentation of outbound calls (e.g. which service are we calling in to) difficult. Generating a class name for es6 enables x.constructor.name to get generated name. - [js] Fix case where services have a method with an argument named "params", generated code generates an identifier in the "send_XXX" body named "params" which conflicts with the argument. Ensure the identifier in the body is uniquely named. - [js] Ensure that derived services (extends XYZService) correctly call super() in their constructor. - [ts] Ensure that derived services (extends XYZSerice) correctly specify the base class Client and Processor name - [js] Ensure that derived service clients do not redefine private fields (output, pClass, _seqId, _reqs) and call super(); - [ts] Ensure derived service clients and processors do not redefine private fields in declaration.
- [js] Missing class name for generated services and processors; this makes instrumentation of outbound calls (e.g. which service are we calling in to) difficult. Generating a class name for es6 enables x.constructor.name to get generated name. - [js] Fix case where services have a method with an argument named "params", generated code generates an identifier in the "send_XXX" body named "params" which conflicts with the argument. Ensure the identifier in the body is uniquely named. - [js] Ensure that derived services (extends XYZService) correctly call super() in their constructor. - [ts] Ensure that derived services (extends XYZSerice) correctly specify the base class Client and Processor name - [js] Ensure that derived service clients do not redefine private fields (output, pClass, _seqId, _reqs) and call super(); - [ts] Ensure derived service clients and processors do not redefine private fields in declaration.
|
Okay; rebased on upstread, merged and force pushed. Let's give this one more go. |
|
That looks related: ../node_modules/.bin/html-validator --file=gen-html/index.html --verbose |
|
commited 7db2d0f |