Repository navigation
Conversation
The `IOFileSystemPath` object lacked a `toString()` method, leading to `Instance of 'IOFileSystemPath'` being rendered in error strings. When `PackageResolutionException` was thrown encountering package resolution errors while reading analysis options, the path output was masked. This change adds `toString()` to `IOFileSystemPath` to output the correct underlying file system `.path`. A test is also added to `io_file_system_test.dart` preventing regressions.
Member
Author
|
This is a follow-up fix to 0d56d85 |
kevmoo
added a commit
to dart-lang/ecosystem
that referenced
this pull request
Mar 28, 2026
The associated analysis_options uses dart_flutter_team_lints So dartfmt was logging a lot of errors. Fixes those Also helped me find/fix dart-lang/dart_style#1818
kallentu
approved these changes
Mar 30, 2026
Curstantine
pushed a commit
to Curstantine/fart_style
that referenced
this pull request
Apr 2, 2026
…art-lang#1818) The `IOFileSystemPath` object lacked a `toString()` method, leading to `Instance of 'IOFileSystemPath'` being rendered in error strings. When `PackageResolutionException` was thrown encountering package resolution errors while reading analysis options, the path output was masked. This change adds `toString()` to `IOFileSystemPath` to output the correct underlying file system `.path`. A test is also added to `io_file_system_test.dart` preventing regressions. * Also improve incorrect error messages about while analysis_options couldn't be found
munificent
added a commit
that referenced
this pull request
Jun 5, 2026
If an analysis_options.yaml file has an include that points to another relative path and reading that other file fails, print a warning and continue as if the file was found and empty. Fix #1840. This is sort of a short-term fix for the root cause of that issue which is that the formatter is trying to format code in `build/` directories that contain packages that aren't fully resolved with all of their dependencies and shouldn't be formatted anyway. I think the right long-term solution for that is to support file exclusion (#864). I plan to work on that soon, but it will take a while because it's part of revising the overall library API and how configuration data is plumbed from hosts to the formatter. Even when that long-term solution is done, I think this change is good too. It's still possible for users to get into this situation, as simply as having a typo in an analysis_options.yaml file. When that happens, the formatter should degrade more gracefully. Warning and continuing as in this PR is consistent with how we handle other configuration failures. --- Note: This PR is identical to #1851 except: * It is intended to be merged onto the dart-sdk-stable branch so that it can be cherry-picked to the stable Dart SDK without pulling in other changes on dart_style main that the stable SDK shouldn't get. * It includes [the changes to `io_file_system.dart`](5ed5aad#diff-cd6508e68de5dc72aa1bb51352d5258b9d1dd228d66fae6b1b0831b25b507726) from [this PR](#1818) which this fix relies on.
This was referenced Jun 5, 2026
munificent
added a commit
that referenced
this pull request
Jun 8, 2026
…#1853) Don't crash on a missing analysis_options.yaml include. If an analysis_options.yaml file has an include that points to another relative path and reading that other file fails, print a warning and continue as if the file was found and empty. Fix #1840. This is sort of a short-term fix for the root cause of that issue which is that the formatter is trying to format code in `build/` directories that contain packages that aren't fully resolved with all of their dependencies and shouldn't be formatted anyway. I think the right long-term solution for that is to support file exclusion (#864). I plan to work on that soon, but it will take a while because it's part of revising the overall library API and how configuration data is plumbed from hosts to the formatter. Even when that long-term solution is done, I think this change is good too. It's still possible for users to get into this situation, as simply as having a typo in an analysis_options.yaml file. When that happens, the formatter should degrade more gracefully. Warning and continuing as in this PR is consistent with how we handle other configuration failures. --- Note: This PR is identical to #1851 except: * It is intended to be merged onto the dart-sdk-stable branch so that it can be cherry-picked to the stable Dart SDK without pulling in other changes on dart_style main that the stable SDK shouldn't get. * It includes [the changes to `io_file_system.dart`](5ed5aad#diff-cd6508e68de5dc72aa1bb51352d5258b9d1dd228d66fae6b1b0831b25b507726) from #1818 which this fix relies on.
munificent
added a commit
that referenced
this pull request
Jun 8, 2026
…1855) If an analysis_options.yaml file has an include that points to another relative path and reading that other file fails, print a warning and continue as if the file was found and empty. Fix #1840. This is sort of a short-term fix for the root cause of that issue which is that the formatter is trying to format code in `build/` directories that contain packages that aren't fully resolved with all of their dependencies and shouldn't be formatted anyway. I think the right long-term solution for that is to support file exclusion (#864). I plan to work on that soon, but it will take a while because it's part of revising the overall library API and how configuration data is plumbed from hosts to the formatter. Even when that long-term solution is done, I think this change is good too. It's still possible for users to get into this situation, as simply as having a typo in an analysis_options.yaml file. When that happens, the formatter should degrade more gracefully. Warning and continuing as in this PR is consistent with how we handle other configuration failures. --- Note: This PR is identical to #1851 except: * Its parent commit is f1d10e1, which is the commit that Dart SDK main branch currently has for dart_style. * It includes [the changes to `io_file_system.dart`](5ed5aad#diff-cd6508e68de5dc72aa1bb51352d5258b9d1dd228d66fae6b1b0831b25b507726) from #1818 which this fix relies on. * It has a slightly different CHANGELOG entry.
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.
The
IOFileSystemPathobject lacked atoString()method, leading toInstance of 'IOFileSystemPath'being rendered in error strings. WhenPackageResolutionExceptionwas thrown encountering package resolution errors while reading analysis options, the path output was masked.This change adds
toString()toIOFileSystemPathto output the correct underlying file system.path. A test is also added toio_file_system_test.dartpreventing regressions.