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

fix(manifest): BREAKING-CHANGE Prevent precision loss in parsed manifest #576

Merged
merged 1 commit into from
Nov 10, 2020

Conversation

sjbarag
Copy link
Owner

@sjbarag sjbarag commented Nov 10, 2020

Numbers are allowed in RBI's manifest file, but brs used to lose precision by parsing them as numbers. This caused some subtle differences when a manifest was re-serialized after parsing, in which 1.0 was represented only as 1. It's unclear whether or not this caused issues with applications run in RBI using that rewritten manifest, but this was originally reported back in July 2019. Stop parsing manifest values as numbers to prevent precision loss.

fixes #279

Numbers are allowed in RBI's `manifest` file, but `brs` used to lose
precision by parsing them as numbers.  This caused some subtle
differences when a `manifest` was re-serialized after parsing, in which
`1.0` was represented only as `1`.  It's unclear whether or not this
caused issues with applications run in RBI using that rewritten
`manifest`, but this was originally reported back in July 2019.  Stop
parsing `manifest` values as numbers to prevent precision loss.

fixes #279
@sjbarag sjbarag added bug Any difference between this BrightScript implementation and RBI, or otherwise unexpected behavior preprocessor Affects this project's conditional-compilation preprocessor labels Nov 10, 2020
Copy link
Collaborator

@alimnios72 alimnios72 left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this

@sjbarag sjbarag changed the base branch from master to main November 10, 2020 18:04
@sjbarag sjbarag merged commit 477435c into main Nov 10, 2020
@sjbarag sjbarag deleted the dont-parse-numbers-in-manifest branch November 10, 2020 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Any difference between this BrightScript implementation and RBI, or otherwise unexpected behavior preprocessor Affects this project's conditional-compilation preprocessor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

brs.preprocessor.getManifest() does not allow raw values without type conversions
2 participants