angular / dgeni-packages

A collection of dgeni packages for generating documentation from source code.
MIT License
142 stars 106 forks source link

improve tracibility of error message #235

Closed nhorvath closed 7 years ago

nhorvath commented 7 years ago

The error message "Ambiguous container document reference" doesn't provide a source generating it. When I encountered it it just said "Ambiguous container document reference: labels" and labels is very common in my app so I had no idea where it was originating. My issue was solved by adding @module to all the doc blocks in my labels service (usually just adding to the overall one is sufficient).

Anyway, this would help track down where the error is coming from.

googlebot commented 7 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


googlebot commented 7 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


nhorvath commented 7 years ago

I signed it!

googlebot commented 7 years ago

CLAs look good, thanks!

googlebot commented 7 years ago

CLAs look good, thanks!

petebacondarwin commented 7 years ago

@nhorvath - thanks for this PR. I am surprised that this adds anything that is not already there, since the createDocMessage service should already put the doc.id into the message. See https://github.com/angular/dgeni-packages/blob/388fb0b4bf75ea0fd12756d756069c3d7e29dd29/base/services/createDocMessage.js#L6

nhorvath commented 7 years ago

@petebacondarwin I reverted my change and added the doc object. The message is much more helpful now.

info: running processor: memberDocsProcessor warn: Ambiguous container document reference: symbol - doc "symbol#method:lookup" (method) - from file "src/services/symbol.js" - starting at line 110, ending at line 120

petebacondarwin commented 7 years ago

Great! I will squash and fix up the commit messages (in accordance with our requirements) when I merge unless you are able to do that first.

nhorvath commented 7 years ago

Sorry I don't know how to edit commit messages

On Wed, Jul 12, 2017 at 9:13 AM, Pete Bacon Darwin <notifications@github.com

wrote:

@petebacondarwin approved this pull request.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/angular/dgeni-packages/pull/235#pullrequestreview-49483806, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKE3NqGJqw7NRiKKeCB9qKctpIy9Y_lks5sNMZqgaJpZM4OTddp .