Repository navigation
Conversation
Owner
Author
|
Opened upstream as temporalio#265. The branch stays, since that PR uses it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
This PR plans WIT
s64andu64as 64-bit integers on the WIT path.The parser mapped every WIT integer type to the 32-bit integer type,
s64andu64too. Only a field with a proto descriptor behind it got the 64-bit type. Nows64andu64map to the 64-bit type, ands8tos32andu8tou32stay as they were.The change shows in the types that only WIT describes: fields of records without
@nexus.proto, and resource method parameters.longin place ofint.int64in place ofint32.Longin place ofnumber, the same type as a protoint64field. This changes the JSON shape of these fields in TypeScript models. Please check that this is the wanted type.inthas no size.nexgen has no unsigned integer type, so
u64maps to the signed 64-bit type, as a protouint64field does.Why?
A 64-bit value, such as an offset or a count, was cut to 32 bits in .NET and Go when the record was WIT-only. A value above 2^31 overflowed with no error.
How did you test it?
tests/generate_dotnet.rsgenerates a WIT-only record withs64,u64ands32fields, and checkslong,longandint. The test fails on main.cargo test --features advancedpasses.cargo build-examplesfor Python, TypeScript, .NET and Go gives no diff, since no sample has a WIT-only 64-bit field.cargo validate gopasses, and the .NET sample tests and builds pass in amcr.microsoft.com/dotnet/sdk:9.0container.Came from fork PR #46.