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

Typescript codegen issue with csharp module. #1977

Open
bfops opened this issue Nov 8, 2024 · 2 comments
Open

Typescript codegen issue with csharp module. #1977

bfops opened this issue Nov 8, 2024 · 2 comments
Assignees

Comments

@bfops
Copy link
Collaborator

bfops commented Nov 8, 2024

Generating TypeScript bindings for a module which uses a timer table fails with error: not yet implemented, apparently here, apparently while generating the bindings for the ScheduleAt enum. Fix this so that it's possible to generate TypeScript bindings for a module which defines at least one timer table.

Update:
Csharp module with timer fails to generate bindings for ScheduleAt enum.
Binding generated for timer struct looks like -

#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
pub struct SendMessageTimer {
	pub text: String,
	pub scheduled_id: u64,
	pub scheduled_at: enum { Time: u64, Interval: u64 },
}

May be related to Typespace not using AlgebraicTypeRef for ScheduledAt enum

Typespace { types: [Product(ProductType { elements: [ProductTypeElement { name: Some("Text"), algebraic_type: Builtin(String) }, ProductTypeElement { name: Some("ScheduledId"), algebraic_type: Builtin(U64) }, ProductTypeElement { name: Some("ScheduledAt"), algebraic_type: Sum(SumType { variants: [SumTypeVariant { name: Some("Time"), algebraic_type: Builtin(U64) }, SumTypeVariant { name: Some("Interval"), algebraic_type: Builtin(U64) }}] },
@bfops
Copy link
Collaborator Author

bfops commented Nov 8, 2024

Did we fix this?

@bfops
Copy link
Collaborator Author

bfops commented Nov 22, 2024

apparently it's this PR #2007

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