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

Reject styling wrongly parsed coder #883

Merged
merged 3 commits into from
Dec 23, 2021

Conversation

lorenzwalthert
Copy link
Collaborator

Closes #847. Turns out we can't fix the problem because we can't construct a string like "\U2660" from "\U" and 2660: Error: '\U' used without hex digits in character string starting ""\U"". So windows users have to wait for R 4.2. @IndrajeetPatil I added a test to make sure it errors under certain circumstances.

@lorenzwalthert lorenzwalthert mentioned this pull request Dec 23, 2021
R/parse.R Outdated
if (any(is_unicode_parsing_error)) {
rlang::abort(
"Can't parse input due to unicode restriction in base R. Please ",
"upgrade R to style this input. ",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe you can specify the exact version of R here that the user needs to upgrade to?

Copy link
Collaborator Author

@lorenzwalthert lorenzwalthert Dec 23, 2021

Choose a reason for hiding this comment

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

Thanks, I adapted it.

@codecov-commenter
Copy link

codecov-commenter commented Dec 23, 2021

Codecov Report

Merging #883 (ce35122) into main (b96d188) will decrease coverage by 0.12%.
The diff coverage is 60.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #883      +/-   ##
==========================================
- Coverage   89.76%   89.63%   -0.13%     
==========================================
  Files          47       47              
  Lines        2500     2509       +9     
==========================================
+ Hits         2244     2249       +5     
- Misses        256      260       +4     
Impacted Files Coverage Δ
R/parse.R 90.58% <50.00%> (-4.22%) ⬇️
R/utils.R 76.66% <100.00%> (+0.80%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b96d188...ce35122. Read the comment docs.

@lorenzwalthert lorenzwalthert merged commit 82e3db8 into r-lib:main Dec 23, 2021
@lorenzwalthert lorenzwalthert deleted the issue-847 branch December 23, 2021 13:54
@github-actions
Copy link
Contributor

This is how benchmark results would change (along with a 95% confidence interval in relative change) if a33c2ab is merged into main:

  •   :ballot_box_with_check:cache_applying: 36.6ms -> 36.5ms [-3.22%, +2.34%]
  •   :ballot_box_with_check:cache_recording: 1.51s -> 1.51s [-1.75%, +1.18%]
  •   :ballot_box_with_check:without_cache: 3.9s -> 3.91s [-0.73%, +1.5%]

Further explanation regarding interpretation and methodology can be found in the documentation.

@lorenzwalthert lorenzwalthert mentioned this pull request Mar 12, 2022
15 tasks
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.

{styler} changes unicode characters on Windows
3 participants