2024.4.18 generation broken
We tried to upgrade from version 2023.12.21 to 2024.4.18 (the interim releases gave us the problems that have subsequently been fixed in the latest version).
For some reason, the output files are missing large chunks of code. Here's an example:
enum EventType {
EVENT_TYPE_UNSPECIFIED = 0;
EVENT_TYPE_ONE = 1;
EVENT_TYPE_TWO = 2;
}
message GetEventsRequest {
uint32 limit = 1;
string status_filter = 2;
EventType events_filter = 3;
}
In the previous version, the output is as follows:
class GetEventsRequest(BaseModel):
limit: int = Field(default_factory=int)
status_filter: str = Field(default_factory=str)
class EventType(IntEnum):
EVENT_TYPE_UNSPECIFIED = 0
EVENT_TYPE_ONE = 1
EVENT_TYPE_TWO = 2
events_filter: EventType = Field(default_factory=int)
In the latest version, the output is as follows:
class GetEventsRequest(BaseModel):
tenant_id: str = Field(default_factory=str)
limit: int = Field(default_factory=int)
status_filter: str = Field(default_factory=str)
So the event type class and events filter just got dropped.
In our response method, the same thing happened and all we were left with is the following, which isn't just wrong but invalid:
class GetEventsResponse(BaseModel):
My naive suspicion is that this is related to the fix with the inner class indentation.
OK, I will rollback
2024.4.18 is deleted on pypi
2024.1.8 also deleted
2023.12.21 is the latest release now. Sorry to have affected your work
@Ed-XCF my apologies for the delayed response, thank you so much 🙏