-
Notifications
You must be signed in to change notification settings - Fork 125
Digit separators prevent formatting #1630
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
Comments
Thanks for the bug report. A few questions:
|
Sorry, I would have included this extra information in the initial bug report but I wasn't sure if I was raising the issue in the right place, so I kept it brief. |
Excellent, thanks! |
Might be a different issue and if so, I can report that. But if I do the following:
Then I change int calculate() {
return 6_2 * 7;
} And then run format I get the following error:
And the content of name: example
description: A sample command-line application.
version: 1.0.0
# repository: https://github.com/my_org/my_repo
environment:
sdk: ^3.6.0
# Add regular dependencies here.
dependencies:
# path: ^1.8.0
dev_dependencies:
lints: ^5.0.0
test: ^1.24.0 |
@Ramgopaljakhar Since you feel the need to write such comment, is it because you can't reproduce the issue yourself? |
I am facing the same issue. Here are my details:
Flutter 3.27.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 68415ad1d9 (9 days ago) • 2025-01-13 10:22:03 -0800
Engine • revision e672b006cb
Tools • Dart 3.6.1 • DevTools 2.40.2
My experience: Since the files that were affected by this bug were large files, I wasn't quite sure what the problem was. After seeing this issue, I removed the digit separators and the formatter worked as usual. |
This is already fixed in the latest version of dart_style. It will also be fixed in the upcoming 3.7.0 release of the Dart SDK. I have a cherry-pick change out to roll a fix into the Dart SDK 3.6.x stable branch. When (if?) we cut a new stable release of 3.6.x, that will hopefully have the fix. In the meantime, I'm really sorry for the bug. It sucks that we shipped digit separators in 3.6.0 but you can't format them. It was an oversight on my part and unfortunately it wasn't caught by tests. :( I'm going to close this because there's no ongoing work left to do in the dart_style repo to fix this. (I've published 2.3.8 with a fix for the 3.6.x SDK branch, and the main branch of dart_style is already fixed.) But it may be some time because users on Dart SDK 3.6.x get a fix. Sorry about that. |
Steps to reproduce:
foo
out and uncomment the second.The text was updated successfully, but these errors were encountered: