You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

DARTFMT 格式化@Component装饰器异常,疑似Bug求助

关于Dartfmt 1.0.12格式化@Component装饰器的Bug反馈及提交指引

Hey there! Let's tackle this issue step by step.

First, regarding where to submit this bug report: The right place for Dart SDK or tooling-related issues (like dartfmt) is the official Dart SDK issue tracker. No need to worry about submitting in the wrong spot—just head over there once you've got the details ready.

Now, about the messy formatting of the @Component decorator with dartfmt 1.0.12 (shipped with the latest Dart 2 dev build): This definitely looks like an unexpected formatting quirk. To help the team fix it quickly, you'll want to provide a bit more context when submitting the issue.

First, let's clean up the code snippet you shared for clarity:

import 'package:angular/angular.dart';
import 'package:angular_router/angular_router.dart';
import 'routes.dart';

@Component(...)
// Your component class definition would go here

When you file the bug, make sure to include:

  • The full, complete @Component configuration (the ... part filled in—this is crucial for reproducing the issue)
  • The exact version number of the Dart 2 dev SDK you're using (not just "latest")
  • A side-by-side comparison of your original code and the messed-up formatted output, so the team can clearly see what's wrong

Also, a quick pre-submission check: Try upgrading to the most recent stable release of the Dart SDK if possible, to see if the issue has already been fixed in a newer version. Sometimes dev builds have unpolished bugs that get resolved in stable releases.

内容的提问来源于stack exchange,提问作者Arne Wolframm

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 10:49:52