Closed Sese-Schneider closed 6 months ago
Interesting sidenote:
I don't know why this broke for me suddenly. We've been using mockito
for over 2 years now and everything used to work fine.
Furthermore we haven't updated the dart version in our codebase in the last few months. The issue seem to have appeared out of nowhere 🤷🏼♂️
Details
Fixes #711
Generated relative imports paths on windows used backslashes instead of forwards slashes. This broke the
DartFormatter
and the build_runner aborted.Fix
I specifically added
p.Context(style: p.Style.posix)
to the.relative
part of the path generation. This ensures the import paths contain only forward slashes.Contribution guidelines:
- See our [contributor guide](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md) for general expectations for PRs. - Larger or significant changes should be discussed in an issue before creating a PR. - Contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use `dart format`. - Most changes should add an entry to the changelog and may need to [rev the pubspec package version](https://github.com/dart-lang/sdk/wiki/External-Package-Maintenance#making-a-change). - Changes to packages require [corresponding tests](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md#Testing). Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.