api: when parsing @ud, also accept plain decimal#5342
Merged
Conversation
Presumably, the `parseUd()` of the old aura-js silently accepted decimal
number strings without dots, because the new `parse('ud', myString)`
calls were (in some cases) (we assume) crashing, failing to parse their
inputs.
Here, we add a helper that tries both and update all `parse('ud', ..)`
calls to use that instead. This may be more lenient than it strictly
needs to be, but we intentionally punt on unraveling that particularly
messy tapestry. (See also `time.md`...)
latter-bolden
approved these changes
Dec 4, 2025
| // we used a too-lenient @ud parser, which also accepted dotless | ||
| // representations, making it slightly unclear/ambiguous what we were actually | ||
| // *intending* to parse. the backend is wildly inconsistent, so this is easier | ||
| // and safer than figuring all that out. (we'll tighten things up Soon™.) |
Member
|
Let's check why the tests are failing tomorrow morning |
2 tasks
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.
Summary
#5134 naively assumed
parseUdmeant we wanted to parse@ud-formatted numbers. Turns out sometimes it means we want to parse plain decimal number strings!Changes
Presumably, the
parseUd()of the old aura-js silently accepted decimal number strings without dots, because the newparse('ud', myString)calls were (in some cases) (we assume) crashing, failing to parse their inputs.Here, we add a helper that tries both and update all
parse('ud', ..)calls to use that instead. This may be more lenient than it strictly needs to be, but we intentionally punt on unraveling that particularly messy tapestry. (See alsotime.md...)How did I test?
Paired on the change concept with @latter-bolden. CI will sanity-check this specific implementation.
(Although, it didn't catch the problematic cases from #5134 either. We suspect this was specific to deletions. Do we not e2e test those?)
Risks and impact
Rollback plan
Revert.