Skip to content

Conversation

@bkietz
Copy link
Member

@bkietz bkietz commented May 27, 2020

Some 64 bit integer values are not representable as JSON numbers, so store these as strings.

This is issue is a regression; original fix was #5267

@github-actions
Copy link

@bkietz bkietz requested review from pitrou and sbinet May 27, 2020 19:39
@fsaintjacques fsaintjacques self-requested a review May 29, 2020 14:56
@@ -26,7 +26,8 @@ class GoTester(Tester):
CONSUMER = True

# FIXME(sbinet): revisit for Go modules
GOPATH = os.getenv('GOPATH', '~/go')
HOME = os.getenv('HOME', '~')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the change, just set GOPATH if you have something else?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why ~ failed resolve to $HOME locally but this seemed like a way to save someone the next person from the frustration of reading the script to figure out that GOPATH needs set.

template <typename T>
using is_physical_integer_type =
std::integral_constant<bool, is_physical_unsigned_integer_type<T>::value ||
is_physical_signed_integer_type<T>::value>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure 100%. but, is this indentation correct?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C++ indentation is deferred to clang-format. We have a CI job which ensures that running clang-format is a no-op. As for explaining why it made this choice... I'm not familiar enough with its implementation to say, sorry

@bkietz bkietz force-pushed the 8471-Regression-to-uint64-as-J branch from 9b581bb to 1ec2517 Compare June 2, 2020 18:03
Copy link
Contributor

@fsaintjacques fsaintjacques left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good thing we actually validates the extreme value now.

@fsaintjacques
Copy link
Contributor

@bkietz one thing, you didn't change anything in Java, so either it was already behaving like this, or the test is disabled for it? If this is disabled, that should be a blocker for 1.0, parsing (u)int64 seems like a blocking requirement.

@pitrou
Copy link
Member

pitrou commented Jun 4, 2020

@bkietz one thing, you didn't change anything in Java, so either it was already behaving like this, or the test is disabled for it?

Java probably accepts both forms, because AFAICT the test isn't disabled for it.

@pitrou
Copy link
Member

pitrou commented Jun 4, 2020

I just looked at the Java code: for Int64 and UInt64, it uses jackson.core.JsonParser::getValueAsString, which accepts both number and string tokens.

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@pitrou
Copy link
Member

pitrou commented Jun 4, 2020

@sbinet Could you validate the Go changes here?

@fsaintjacques
Copy link
Contributor

I say we move on and accept the go changes.

@wesm
Copy link
Member

wesm commented Jun 5, 2020

This patch is failing some of the time in Appveyor due to integer narrowing. I'm fixing the problems in #7352

@bkietz bkietz deleted the 8471-Regression-to-uint64-as-J branch February 25, 2021 16:32
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

Successfully merging this pull request may close these issues.

5 participants