Skip to content

The new --legacy-proto-load flag generates invalid syntax in service clients #607

@aohren

Description

@aohren

Using the --legacy-proto-load flag with googleads protos generates invalid JS code in service client constructors.

Below is a snippet showing the );, that causes compile errors between each this._gaxGrpc.loadProto call:

...
    // Load the applicable protos.
    this._protos = Object.assign(
        {},
        this._gaxGrpc.loadProto(
            path.join(__dirname, '..', '..', 'protos'),
            'google/ads/googleads/v7/enums/policy_topic_entry_type.proto')
    );,
        this._gaxGrpc.loadProto(
            path.join(__dirname, '..', '..', 'protos'),
            'google/ads/googleads/v7/enums/policy_topic_evidence_destination_mismatch_url_type.proto')
    );,
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions