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

[TS/Rust/Go/Dart] Fix handling of +/-inf defaults in codegen #7588

Merged
merged 9 commits into from
Nov 8, 2022

Conversation

jkuszmaul
Copy link
Contributor

+/-inf were not being handled, and so invalid typescript was being generated when a float/double had an infinite default value. NaN was being handled correctly.

@jkuszmaul jkuszmaul changed the title Fix handling of +/-inf defaults in typescript codegen [TS] Fix handling of +/-inf defaults in typescript codegen Oct 17, 2022
@jkuszmaul
Copy link
Contributor Author

And I see Rust, Go, and Dart also don't handle this correctly.....

@jkuszmaul jkuszmaul changed the title [TS] Fix handling of +/-inf defaults in typescript codegen [TS/Rust/Go/Dart] Fix handling of +/-inf defaults in typescript codegen Oct 17, 2022
@jkuszmaul jkuszmaul force-pushed the ts_inf_default branch 2 times, most recently from cf01985 to 6bc90f0 Compare October 17, 2022 17:31
@jkuszmaul jkuszmaul changed the title [TS/Rust/Go/Dart] Fix handling of +/-inf defaults in typescript codegen [TS/Rust/Go/Dart] Fix handling of +/-inf defaults in codegen Oct 17, 2022
@jkuszmaul jkuszmaul force-pushed the ts_inf_default branch 2 times, most recently from 817819a to 1157ba8 Compare October 17, 2022 17:48
@jkuszmaul
Copy link
Contributor Author

Okay, everything is passing except for the Go test, and I must be blind because I cannot figure out what the Go test is failing on from looking at the output.

@CasperN
Copy link
Collaborator

CasperN commented Oct 17, 2022

Okay, everything is passing except for the Go test, and I must be blind because I cannot figure out what the Go test is failing on from looking at the output.

They seem to be the same up to addresses
(I copied the output, changed spaces to newlines, and used diff to compare)

+/-inf were not being handled, and so invalid typescript was being
generated when a float/double had an infinite default value. NaN was
being handled correctly.
CasperN
CasperN previously approved these changes Oct 26, 2022
@jkuszmaul
Copy link
Contributor Author

The Kotlin MacOS build looks just flaky, not sure how to rerun it (other than just making a dummy commit or rebasing on mater again or some similarly silly thing).

@jkuszmaul
Copy link
Contributor Author

@CasperN @dbaileychess The Kotlin Linux build seems to have flaked out this time; not quite sure what the appropriate response from me is when builds fail in this manner, or if I've just gotten particularly unlucky with flakiness to have two different Kotlin tests flake out in a row.

@dbaileychess
Copy link
Collaborator

I updated that runner e545361 due to this thread: gradle/wrapper-validation-action#40

@dbaileychess
Copy link
Collaborator

Sorry, i mistyped the fix, rerunning the CI.

@dbaileychess dbaileychess merged commit 8aa8b91 into google:master Nov 8, 2022
frc971-automation pushed a commit to frc971/971-Robot-Code that referenced this pull request Dec 13, 2022
Update flatbuffers. Relevant merge tasks:
* A field got added to reflection.fbs; this had fallout in
  reflection_generated.h and the logger_test shas.
* Resolved merge conflict in rust/flatbuffers/src/lib.rs
* Reverted upstream change that made Table rust struct members private.
* FlatBufferBuilder Create*Vector calls now include alignment.
* nim codegen got added; needed to update to use scoped enums.

Main fix that motivated this update is
google/flatbuffers#7588

Change-Id: I6bbe5d56846f426fa5f2a82c4f2bc77be2b93bb0
Signed-off-by: James Kuszmaul <[email protected]>
jochenparm pushed a commit to jochenparm/flatbuffers that referenced this pull request Oct 29, 2024
+/-inf were not being handled, and so invalid typescript was being
generated when a float/double had an infinite default value. NaN was
being handled correctly.

Co-authored-by: Derek Bailey <[email protected]>
Co-authored-by: Casper <[email protected]>
jochenparm pushed a commit to jochenparm/flatbuffers that referenced this pull request Oct 29, 2024
+/-inf were not being handled, and so invalid typescript was being
generated when a float/double had an infinite default value. NaN was
being handled correctly.

Co-authored-by: Derek Bailey <[email protected]>
Co-authored-by: Casper <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants