Repository navigation
Conversation
|
5eaf0c6 to
db9a94e
Compare
|
Hi @cadivus, we'd like this formatting change in Dart 1.0.0, so to save you the rebase I opened #1663 into your branch. It merges What #1663 changes, on top of your commit:
All checks on #1663 are green, and Swift and Kotlin goldens are unchanged. You can merge #1663 into your branch as is, or pull any local changes first. Feel free to drop or reword anything. |
db9a94e to
b397b92
Compare
|
Thanks for rebasing. Since you did, #1663 targets your old head and can be closed. Two checks still fail on b397b92:
# dart_style and pub_semver are verifiably BSD-3-Clause:
# https://pub.dev/packages/dart_style/license
# https://pub.dev/packages/pub_semver/license
#
- "pkg:pub/dart_style"
- "pkg:pub/pub_semver"You can cherry-pick it with |
|
One more: the sink-guard pin in |
The generator returned raw StringBuffer output from every sink, so generated clients failed `dart format`. generate() now formats the complete unit with dart_style using the target package language version from package_config for build_runner and CLI, with Dart 3.11 fallback. It prepends `// dart format width=80` so output is stable regardless of consumer page_width. Dart goldens were regenerated.
…format layout The rebase reformatted both files with Dart 3.11's formatter; CI checks formatting with stable (3.14), which keeps main's layout. Restore it, keeping only the switch to the Dart-source contains matcher.
e632aa0 to
919b4ce
Compare
Problem
blocks_codegen0.2.0 returns raw Dart source from the direct generator API,build_runner, and the CLI. A generated client can be reproduced and rejected by
the SDK formatter with:
Before this fix, the second command exits nonzero because the generated file is
not canonical Dart formatter output.
Issue #, if available:
Changes
DartCodeGenerator.generate()after generated-name validation.// dart format width=80marker and a deterministic Dart3.11 fallback for direct generator calls.
build_runner and CLI output or stdout contexts, using APIs shared by
package_config 2.x and 3.x.
Error:diagnostics without writing output.
dart_style,package_config, andpub_semverdependencies.Kotlin fixture changed.
semantic assertion tests that retain token and record-comma distinctions.
entry.
Review note: most fixture changes are generated-only canonical whitespace and
formatter-managed trailing commas. This branch is based on origin/main at
e1e4844 and includes #1573's generated namespace naming semantics. PR #1481
may still conflict in the Dart generator and goldens; rebase and rerun Dart-only
regeneration if it merges first.
Validation
dart test test/generated_code_compiles_test.dartfailed before the fix because
dart formatchanged both scratch clients, thenpassed after the fix and golden regeneration.
build 5.0.0/package_config 3.0.0, and
build 4.0.11/package_config 2.2.0.
compatible resolution: build 4.0.8, dart_style 3.1.11,
package_config 2.2.0, and pub_semver 2.1.5.
Dart 3.11.
changes and had no analyzer issues.
dart format --output=none --set-exit-if-changed .,dart analyze --no-fatal-warnings .,npm run build,npm run lint:deps, andnpm run test:e2e:localpassed.dart pub publish --dry-runpassed with 0 warnings. Nothing was published.Three broader failures reproduce on clean origin/main and are unrelated to this
change:
npm testhits sandbox process/EPERM and workspace detection failures;native/dart/run-e2e.shcannot resolve hosted versus pathblocks_runtime;and tests after
dart pub downgradecannot load throughfrontend_server_client.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.