Skip to content

Regression: new warning system unable to handle warnings caused by package README.md #1409

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
alan-knight opened this issue May 9, 2017 · 5 comments · Fixed by #1410
Closed
Assignees
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@alan-knight
Copy link

This version refuses to generate docs for Intl due to changes in

47b60b4

There are two libraries, one for dart:io and one for dart:html which both re-export the same thing, and it considers this ambiguous. Even if it was ambiguous, that's hardly a reason to refuse to generate documentation.

@alan-knight
Copy link
Author

@kwalrath

@alan-knight alan-knight added the P1 A high priority bug; for example, a single project is unusable or has many test failures label May 9, 2017
alan-knight referenced this issue May 9, 2017
* Squash canonicalization overhaul part2 into single commit

* Cleanup and add comments

* dartfmt

* Update changelog, reduce memory usage for link checker

* dartfmt

* delete dartdoc.iml

* Review comments

* dartfmt

* whitespace in changelog

* Comment enhancements

* Correct changelog to 'orphaned file checker'

* update test package docs -- whitespace change in SDK
@jcollins-g
Copy link
Contributor

It is actually failing to generate documentation due to a bug where somehow we've managed to try to print a warning for a nonexistent ModelElement, not the ambiguous reexport.

@jcollins-g
Copy link
Contributor

Relevant backtrace:

            stderr:
            warning: ambiguous reexport of locale_list.availableLocalesForDateFormatting, canonicalization candidates: (date_symbol_data_file, date_symbol_data_http_request) (file:///root/.pub-cache/hosted/pub.dartlang.org/intl-0.15.0/lib/src/data/dates/locale_list.dart:6:7)Generation failed: NoSuchMethodError: The method 'warn' was called on null.
            Receiver: null
            Tried calling: warn(Instance of 'PackageWarning', "nerated_file_prefix=<prefix>")
            dart:core                                                                     Object.noSuchMethod
            package:dartdoc/src/markdown_processor.dart 693                               _showWarningsForGenericsOutsideSquareBracketsBlocks.<fn>
            dart:core                                                                     List.forEach
            package:dartdoc/src/markdown_processor.dart 682                               _showWarningsForGenericsOutsideSquareBracketsBlocks
            package:dartdoc/src/markdown_processor.dart 664                               _renderMarkdownToHtml
            package:dartdoc/src/markdown_processor.dart 736                               Documentation.Documentation
            package:dartdoc/src/model.dart 3171                                           Package.documentationAsHtml
            dart:mirrors                                                                  _LocalInstanceMirror.getField
            package:mustache4dart/mustache_context.dart 317                               _ObjectReflectorDeclaration.value
            package:mustache4dart/mustache_context.dart 246                               _ObjectReflector.[]
            package:mustache4dart/mustache_context.dart 132                               _MustacheContext._getActualValue
            package:mustache4dart/mustache_context.dart 105                               _MustacheContext._getMustachContext
            package:mustache4dart/mustache_context.dart 101                               _MustacheContext._getContextForKey
            package:mustache4dart/mustache_context.dart 74                                _MustacheContext._getInThisOrParent
            package:mustache4dart/mustache_context.dart 70                                _MustacheContext.[]
            package:mustache4dart/mustache_context.dart 77                                _MustacheContext._getInThisOrParent
            package:mustache4dart/mustache_context.dart 70                                _MustacheContext.[]
            package:mustache4dart/src/tokens.dart 163                                     _ExpressionToken.apply
            package:mustache4dart/src/tokens.dart 293                                     _StartSectionToken.apply.<fn>
            package:mustache4dart/src/tokens.dart 303                                     _StartSectionToken.forEachUntilEndSection
            package:mustache4dart/src/tokens.dart 293                                     _StartSectionToken.apply
            package:mustache4dart/src/tokens.dart 40                                      Token.call
            package:mustache4dart/src/tmpl.dart 101                                       _Template._write
            package:mustache4dart/src/tmpl.dart 76                                        _Template.call
            package:mustache4dart/src/mustache.dart 14                                    render
            package:mustache4dart/src/tokens.dart 205                                     _PartialToken.apply
            package:mustache4dart/src/tokens.dart 293                                     _StartSectionToken.apply.<fn>
            package:mustache4dart/src/tokens.dart 303                                     _StartSectionToken.forEachUntilEndSection
            package:mustache4dart/src/tokens.dart 293                                     _StartSectionToken.apply
            package:mustache4dart/src/tokens.dart 40                                      Token.call
            package:mustache4dart/src/tmpl.dart 101                                       _Template._write
            package:mustache4dart/src/tmpl.dart 76                                        _Template.call
            package:dartdoc/src/html/html_generator_instance.dart 302                     HtmlGeneratorInstance._build
            package:dartdoc/src/html/html_generator_instance.dart 185                     HtmlGeneratorInstance.generatePackage
            package:dartdoc/src/html/html_generator_instance.dart 94                      HtmlGeneratorInstance._generateDocs
            package:dartdoc/src/html/html_generator_instance.dart 47                      HtmlGeneratorInstance.generate
            package:dartdoc/src/html/html_generator.dart 74                               HtmlGenerator.generate
            package:dartdoc/dartdoc.dart 188                                              DartDoc.generateDocs
            /root/.pub-cache/hosted/pub.dartlang.org/dartdoc-0.11.1/bin/dartdoc.dart 176  main.<fn>
            package:stack_trace                                                           Chain.capture
            /root/.pub-cache/hosted/pub.dartlang.org/dartdoc-0.11.1/bin/dartdoc.dart 175  main
            ===== asynchronous gap ===========================
            dart:async                                                                    _Completer.completeError
            package:dartdoc/src/html/html_generator_instance.dart 56                      HtmlGeneratorInstance.generate
            ===== asynchronous gap ===========================
            dart:async                                                                    Future.Future.microtask
            package:dartdoc/src/html/html_generator_instance.dart 43                      HtmlGeneratorInstance.generate
            package:dartdoc/src/html/html_generator.dart 74                               HtmlGenerator.generate
            package:dartdoc/dartdoc.dart 188                                              DartDoc.generateDocs
            ===== asynchronous gap ===========================
            dart:async                                                                    Future.Future.microtask
            package:dartdoc/dartdoc.dart 126                                              DartDoc.generateDocs
            /root/.pub-cache/hosted/pub.dartlang.org/dartdoc-0.11.1/bin/dartdoc.dart 176  main.<fn>
            ===== asynchronous gap ===========================
            dart:async                                                                    Future.Future.microtask
            /root/.pub-cache/hosted/pub.dartlang.org/dartdoc-0.11.1/bin/dartdoc.dart 175  main.<fn>
            package:stack_trace                                                           Chain.capture
            /root/.pub-cache/hosted/pub.dartlang.org/dartdoc-0.11.1/bin/dartdoc.dart 175  main

@jcollins-g jcollins-g changed the title Regression: Refuses to generate docs for false positive ambiguous re-export Regression: new warning system unable to handle warnings caused by package comments May 10, 2017
@devoncarew
Copy link
Member

@jcollins-g, from a brief look, it looks like this is happening when generating docs for the the package - from documentation parsed from the readme.md file.

@jcollins-g
Copy link
Contributor

confirmed: the new warning system has a bug where we don't handle warnings generated by the top level package docs correctly. Should be reasonably easy to fix.

@jcollins-g jcollins-g changed the title Regression: new warning system unable to handle warnings caused by package comments Regression: new warning system unable to handle warnings caused by package README.md May 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants