-
Notifications
You must be signed in to change notification settings - Fork 64
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
Trailing commas cause an unfriendly error message on R devel #320
Comments
This trailing comma has no functional role and seems to be at the origin of carpentries#149, as reported in tidyverse/glue#320.
We should be able to fix this so it's not an error. |
I'm inclined to think that maybe it's neutral to good that this is an error? In all the cases linked above, it revealed a trailing comma that seems to have been a mistake. Is there a reason why we would want intentionally be silent about this? |
It’s nice if you want one argument on each line, and an easy way to add new arguments. We support a trailing comma in dplyr and elsewhere for that reason. |
I don't mind the trailing comma's personally, although their purpose can raise question marks . In any case, the error is currently quite confusing |
So you can use a trailing comma if you want. Fixes #320.
Brief description of the problem
On R devel, trailing commas now cause an error:
Created on 2024-02-01 with reprex v2.1.0
Session info
This is new in R devel, and was not an error in previous versions:
Created on 2024-02-01 with reprex v2.0.2
Session info
I think it's perfectly fine for this to cause an error, but it took me a minute to find the root cause of a CRAN error based on the message and traceback that gets generated. Would it be possible to catch this and provide a friendlier error message?
The text was updated successfully, but these errors were encountered: