-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Warn for missing / obsolete error docs #15844
Conversation
82c9134
to
fe3c719
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm no dgeni guru, but afaik LGTM 😃
(It would be nice to have a test for templateRequestMinErr
, but not a blocker.)
💯
src/ng/templateRequest.js
Outdated
@@ -1,6 +1,6 @@ | |||
'use strict'; | |||
|
|||
var $templateRequestMinErr = minErr('$compile'); | |||
var $templateRequestMinErr = minErr('$templateRequest'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And no test broke? Seems like we're missing one 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually a lot of tests broke. 😨 I didn't think of implications of the change. I think we said that changing the error name/ namespace is a breaking change so we can't do that in 1.6.
fe3c719
to
8dc9aa2
Compare
I think this is actually an issue with min Err / error extraction task / script: - The min error for $compile:tpload gets extracted as $templateRequest:tpload to errors.json which means the erro match script gets thrown off. I think these lines might lead to minErr assigning the wrong namespace: angular.js/src/ng/templateRequest.js Line 3 in c35786a
angular.js/src/ng/templateRequest.js Line 102 in c35786a
|
We probably shouldn't use misleading namespaces (var name !== namespace). |
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Chore
What is the current behavior? (You can also link to an open issue here)
We don't know when error docs are missing or obsolete
Does this PR introduce a breaking change?
No
Please check if the PR fulfills these requirements
Other information:
I have removed an obsolete animation error and moved the tpload error to the correct namespace. In the $templateRequest file, it looks like the error is created in the $compile namespace, but it actually ends up as the $templateRequest namespace, where it should be.