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

Switched generated copy constructor to a dummy one and removed any on… #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Cyril-CdV
Copy link

No description provided.

@Cyril-CdV Cyril-CdV force-pushed the constructor-and-oneof-simplification branch from f70f2f0 to e0f99ae Compare January 27, 2025 16:44
@Cyril-CdV Cyril-CdV force-pushed the constructor-and-oneof-simplification branch from e0f99ae to d42ddbe Compare January 27, 2025 16:57
* @returns {Codegen} Codegen instance
*/
Type.generateConstructor = function generateConstructor(mtype) {
Type.generateConstructor = function generateConstructor(mtype, minimal = false) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type.generateConstructor(this) is used in l155 without this flag ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My guess is that this call is used to dynamically generate the constructor (i.e. at runtime), only used in the reflection mode (see https://github.com/protobufjs/protobuf.js?tab=readme-ov-file#nodejs)

cli/targets/static.js Show resolved Hide resolved
@Cyril-CdV Cyril-CdV force-pushed the constructor-and-oneof-simplification branch from a8c7e9a to 51b717c Compare February 7, 2025 11:01
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 this pull request may close these issues.

2 participants