-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
xml test output: remove legacy fallback #24606
Conversation
✍🏾 |
Hmm, pretty sure boost doesn't play this game either, e.g., if the time happens to be an integer value like |
Yes from everywhere I have read this is supposed to always represent seconds - so maybe it's possible to just remove the millisecond fallback case? |
Actually I wonder if the better route is to just remove the millisecond fallback entirely. Every tool that can write this that I have checked uses seconds for their attribute, the code hasn't changed since it was open sourced in 2015. I guess this would require an incompatible change flag. I can update the PR monday |
@meisterT Can you check whether Google still relies on the fallback logic? |
I think it's obsolete, but I will do some follow-up code archeology. Give me two more days. |
Boost test when writing XML files may sometimes omit the decimal point, but still write in scientific notation as floating point seconds. To support reading these XML files, if the string contains an `e`, then try to parse as a float in hopes it's a floating point number. Since parseLong will not support a `e` character this seems like a safe change that is unlikely to break anything. Note that the comment here is fixed as it was phrased opposite of the actual implementation.
fb93455
to
26062d9
Compare
Thanks @meisterT! I've proactively updated my PR in hopes the code archeology provides to confirm the fallback behavior is obsolete. |
Spoke too soon, sorry. Turns out it is still necessary and in more than one place :-/ The need was introduced in 2008, removed in 2009 and re-introduced in a couple of places (cargo culting I assume) in 2016+. It is non-trivial to clean these up. While I will see whether I can do that, it will take a while and Bazel for now shouldn't remove the fallback. Sorry again. |
Can we add an --incompatible flag to disable them for Bazel but Blaze can keep them on? |
We could, but I am not sure whether it's worth the effort. |
Boost test when writing XML files may sometimes omit the decimal point,
but still write in scientific notation as floating point seconds. To
support reading these XML files, remove the legacy fallback for these time values
where it falls back to integer milliseconds if there are no decimal points.
Fixes: #24605