-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(dart/transform): Handle export cycles
Currently, an export cycle in dart inputs will cause the transformer to hang indefinitely on the `DirectiveMetadataExtractor` step. Closes #4370
- Loading branch information
Tim Blasi
committed
Sep 25, 2015
1 parent
af9f916
commit e7d65ad
Showing
5 changed files
with
81 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
19 changes: 19 additions & 0 deletions
19
...transform/test/transform/directive_metadata_extractor/export_cycle_files/bar.ng_deps.dart
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
library foo.ng_deps.dart; | ||
|
||
import 'bar.dart'; | ||
import 'package:angular2/src/core/metadata.dart'; | ||
|
||
export 'baz.dart'; | ||
import 'baz.ng_deps.dart' as i0; | ||
|
||
var _visited = false; | ||
void initReflector(reflector) { | ||
if (_visited) return; | ||
_visited = true; | ||
reflector | ||
..registerType( | ||
BarComponent, | ||
new ReflectionInfo(const [const Component(selector: '[bar]')], const [], | ||
() => new BarComponent())); | ||
i0.initReflector(reflector); | ||
} |
17 changes: 17 additions & 0 deletions
17
...transform/test/transform/directive_metadata_extractor/export_cycle_files/baz.ng_deps.dart
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
library foo.ng_deps.dart; | ||
|
||
import 'baz.dart'; | ||
import 'package:angular2/src/core/metadata.dart'; | ||
|
||
export 'foo.dart'; | ||
|
||
var _visited = false; | ||
void initReflector(reflector) { | ||
if (_visited) return; | ||
_visited = true; | ||
reflector | ||
..registerType( | ||
BazComponent, | ||
new ReflectionInfo(const [const Component(selector: '[baz]')], const [], | ||
() => new BazComponent())); | ||
} |
19 changes: 19 additions & 0 deletions
19
...transform/test/transform/directive_metadata_extractor/export_cycle_files/foo.ng_deps.dart
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
library foo.ng_deps.dart; | ||
|
||
import 'foo.dart'; | ||
import 'package:angular2/src/core/metadata.dart'; | ||
|
||
export 'bar.dart'; | ||
import 'bar.ng_deps.dart' as i0; | ||
|
||
var _visited = false; | ||
void initReflector(reflector) { | ||
if (_visited) return; | ||
_visited = true; | ||
reflector | ||
..registerType( | ||
FooComponent, | ||
new ReflectionInfo(const [const Component(selector: '[foo]')], const [], | ||
() => new FooComponent())); | ||
i0.initReflector(reflector); | ||
} |