Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

Re-synthesize line number for unresolved metadata build errors #1350

Closed
leonsenft opened this issue May 29, 2018 · 1 comment
Closed

Re-synthesize line number for unresolved metadata build errors #1350

leonsenft opened this issue May 29, 2018 · 1 comment

Comments

@leonsenft
Copy link
Contributor

When an argument to directives can't be resolved, in this example because of a missing import,

import 'package:angular/angular.dart';

@Component(
  selector: 'app',
  template: 'Hello world',
  directives: const [FooDirective],
)
class AppComponent {}

we emit a build failure indicating which argument couldn't be resolved with incorrect line and column information

[SEVERE]: Compiling @Component-annotated class "AppComponent" failed.

Try the following when diagnosing the problem:
  * Check your IDE or with the dartanalyzer for errors or warnings
  * Check your "import" statements for missing or incorrect URLs

If you are still stuck, file an issue and include this error message:
https://github.com/dart-lang/angular/issues/new

line 1, column 121 of package:example/app_component.dart: This argument *may* have not been resolved
FooDirective
^^^^^^^^^^^^

The column number is actually the character offset into the file at which the argument occurs, and should be used to re-synthesize the correct line and column numbers.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants