Skip to content

angular_components contains multiple public libraries named the same, breaking dartdoc assumptions #1526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jcollins-g opened this issue Oct 25, 2017 · 1 comment
Labels
customer-google3 Issues originating from or important to Angular P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@jcollins-g
Copy link
Contributor

@kwalrath

Doing some testing for #1524 and noticed that angular_components now throws asserts in checked mode because of multiple public libraries having the same name.

generating docs for library angular_2 from angular_2.dart...
 warning: no canonical library found for dart-html.Window, not linking, from dart-html.Window: (file:///usr/local/google/home/jcollins/dart/all_sdks/2.0.0-dev.4.0/lib/html/dart2js/html_dart2js.dart:36875:7)
 warning: no canonical library found for injector.Injector, not linking, from injector.Injector: (file:///usr/local/google/home/jcollins/.pub-cache/hosted/pub.dartlang.org/angular-4.0.0/lib/src/di/injector/injector.dart:29:16)
 warning: no canonical library found for dart-async.Future, not linking, from dart-async.Future: (file:///usr/local/google/home/jcollins/dart/all_sdks/2.0.0-dev.4.0/lib/async/future.dart:149:16)
generating docs for library angular_2 from angular_2.dart...
 warning: no canonical library found for ng_zone.NgZone, not linking
    from ng_zone.NgZone: (file:///usr/local/google/home/jcollins/.pub-cache/hosted/pub.dartlang.org/angular-4.0.0/lib/src/core/zone/ng_zone.dart:78:7)
    referred to by angular_2.Angular2ManagedZone: (file:///usr/local/google/home/jcollins/dart/angular2_components/lib/utils/angular/managed_zone/angular_2.dart:14:7)
Generation failed: 'package:dartdoc/src/html/html_generator_instance.dart': Failed assertion: line 310 pos 12: '!_writtenFiles.contains(fullName)': is not true.
dart:core                                                     _AssertionError._throwNew
package:dartdoc/src/html/html_generator_instance.dart 310:12  HtmlGeneratorInstance._build
package:dartdoc/src/html/html_generator_instance.dart 200:5   HtmlGeneratorInstance.generateLibrary
package:dartdoc/src/html/html_generator_instance.dart 100:7   HtmlGeneratorInstance._generateDocs
package:dartdoc/src/html/html_generator_instance.dart 48:7    HtmlGeneratorInstance.generate
package:dartdoc/src/html/html_generator.dart 74:22            HtmlGenerator.generate
package:dartdoc/dartdoc.dart 187:23                           DartDoc.generateDocs
../dartdoc/bin/dartdoc.dart 208:44                            main.<fn>
package:stack_trace                                           Chain.capture
../dartdoc/bin/dartdoc.dart 207:9                             main
===== asynchronous gap ===========================
dart:async                                                    _Completer.completeError
package:dartdoc/src/html/html_generator_instance.dart 57:3    HtmlGeneratorInstance.generate
===== asynchronous gap ===========================
dart:async                                                    new Future.microtask
package:dartdoc/src/html/html_generator_instance.dart 44:27   HtmlGeneratorInstance.generate
package:dartdoc/src/html/html_generator.dart 74:22            HtmlGenerator.generate
package:dartdoc/dartdoc.dart 187:23                           DartDoc.generateDocs
===== asynchronous gap ===========================
dart:async                                                    new Future.microtask
package:dartdoc/dartdoc.dart 128:47                           DartDoc.generateDocs
../dartdoc/bin/dartdoc.dart 208:44                            main.<fn>
===== asynchronous gap ===========================
dart:async                                                    new Future.microtask
../dartdoc/bin/dartdoc.dart 207:26                            main.<fn>
package:stack_trace                                           Chain.capture
../dartdoc/bin/dartdoc.dart 207:9                             main


Process finished with exit code 255

Some examples of this:

  • utils/browser/dom_service/angular_2.dart & utils/angular/managed_zone/angular_2.dart
  • material_select/display_name.dart & model/ui/display_name.dart
  • laminate/popup/module.dart & laminate/overlay/module.dart & theme/module.dart & laminate/ruler/module.dart & utils/browser/window/module.dart

The assert is not new, but while I was off on dart2now it had been a while since I had run angular2_components myself.

The consequence of this (assuming you're not in checked mode) is only one of the identically named libraries will show up in indexes and many links, with a lot of confusing internal linkage to and from elements in these libraries.

Proposed solution is to detect this situation and write libraries with name conflicts to different directories.

@jcollins-g jcollins-g added customer-google3 Issues originating from or important to Angular P1 A high priority bug; for example, a single project is unusable or has many test failures labels Oct 25, 2017
@jcollins-g jcollins-g changed the title angular_components contains multiple public libraries named the same angular_components contains multiple public libraries named the same, breaking dartdoc assumptions Oct 25, 2017
@jcollins-g
Copy link
Contributor Author

Fixed in #1524.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-google3 Issues originating from or important to Angular P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

1 participant