You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
syntax = "proto3";
package content_delivery;
import "google/protobuf/struct.proto";
...
message Test {
// optional google.protobuf.Value data = 5; // If this replaces the next line, it does not work
optional google.protobuf.Struct data = 5;
}
Using Struct correctly requires the dependencies in the built content-delivery.ts, but does not if Value or ListValue is used.
The missing lines are as follows, the files otherwise being identical:
- import { wrappers } from "protobufjs";
import { Observable } from "rxjs";
import { ContentElement_MetaProps, Course, CourseMetaProps, Page } from "./content.pb";
- import { Struct } from "./google/protobuf/struct.pb";
...
+ data?:+ | any+ | undefined;- data?: { [key: string]: any } | undefined;
...
- wrappers[".google.protobuf.Struct"] = { fromObject: Struct.wrap, toObject: Struct.unwrap } as any;
As you can see, the types seem to be correct, but the import is not there.
This only happens with the Nestjs option - without it, the generated files are working, i.e. they only have expected differences (using Value. vs Struct).
EDIT: Also, it seems Struct is there only if it's part of at least one root message, but not if all messages containing it are nested:
In this case, even Struct will not be correctly imported (again, only in the case of Nest plugin).
Should I open another issue for that, since it looks like a different problem?
Version: Initially tried on 1.156.6, then tried bumping to latest 1.166.2
The text was updated successfully, but these errors were encountered:
dbettini
changed the title
Value/ListValue do not include the required dependencies during build compared to Struct
Value/ListValue do not include the required dependencies for Nestjs
Jan 9, 2024
dbettini
changed the title
Value/ListValue do not include the required dependencies for Nestjs
Value/ListValue do not include the required dependencies when using nestJs=true
Jan 9, 2024
For
content-delivery.proto
file:Using Struct correctly requires the dependencies in the built
content-delivery.ts
, but does not if Value or ListValue is used.The missing lines are as follows, the files otherwise being identical:
As you can see, the types seem to be correct, but the import is not there.
This only happens with the Nestjs option - without it, the generated files are working, i.e. they only have expected differences (using Value. vs Struct).
EDIT: Also, it seems Struct is there only if it's part of at least one root message, but not if all messages containing it are nested:
In this case, even Struct will not be correctly imported (again, only in the case of Nest plugin).
Should I open another issue for that, since it looks like a different problem?
Version: Initially tried on 1.156.6, then tried bumping to latest 1.166.2
The text was updated successfully, but these errors were encountered: