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

2024.4.18 generation broken #13

Closed
adamf-sendblocks opened this issue May 7, 2024 · 5 comments
Closed

2024.4.18 generation broken #13

adamf-sendblocks opened this issue May 7, 2024 · 5 comments

Comments

@adamf-sendblocks
Copy link

adamf-sendblocks commented May 7, 2024

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.

@Ed-XCF
Copy link
Owner

Ed-XCF commented May 8, 2024

OK, I will rollback

@Ed-XCF
Copy link
Owner

Ed-XCF commented May 8, 2024

2024.4.18 is deleted on pypi

@Ed-XCF
Copy link
Owner

Ed-XCF commented May 8, 2024

2024.1.8 also deleted

@Ed-XCF
Copy link
Owner

Ed-XCF commented May 8, 2024

2023.12.21 is the latest release now. Sorry to have affected your work

@adamf-sendblocks
Copy link
Author

@Ed-XCF my apologies for the delayed response, thank you so much 🙏

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

No branches or pull requests

2 participants