Add an error message for missing dependencies. #5
Conversation
@boushley thanks! Can you please;
Ad. using karma logger, something like this: var DependencyResolver = function(logger) {
var log = logger.create('closure');
// ...
log.error('...'); |
Added a single unit test for the resolver that isn't very thorough, but it provides the logger dependency. @vojtajina let me know if you need me to get the resolver unit tests done further before landing this. I've taken care of the other issues. |
It looks like the Travis test is still failing, but it appears that part of the test was failing prior to my changes. At least when I run
I'll try and look into it at some point if I can find time to dig into that error. |
if (provideMap[dep]) { | ||
resolveFile(provideMap[dep], files, alreadyResolvedMap); | ||
} else { | ||
// TODO(vojta): Use karma logger instead of console.error |
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.
remove this todo
The Travis build passes on the master, but it's weird, it should actually fail - I don't understand how come that it does find "karma" reference, as karma is not installed globally. Anyway, I fixed that. Can you rebase it on the latest master, to see if it passes ? |
Also, please remove the note about using karma logger (in the commit msg), as you already did it ;-) |
Good catch on the todo comment :D And it looks like the Travis build is passing again. |
Can you remove the note about using karma logger (in the commit msg), as you already did it ;-) |
I think the message is fixed and pushed, but the github site isn't coming Aaron On Sat, Jul 13, 2013 at 7:37 PM, Vojta Jina notifications@github.comwrote:
|
Github has been pretty lame today ;-) Let's remove the test, as it does not test anything anyway and it's good to merge. Thanks a lot @boushley ! |
This ensures that something is printed out for users who didn't add a mapping for one of their dependencies. Either they missed a deps.js file or they didn't preprocess all of their source files. The current behavior adds an undefined filepath which ends up causing the karma web-server to blow up when it trys to do indexOf on undefined.
Got it pushed up with the tests commented out. Hope it wasn't more effort getting my commit squared away :) I figured it was on my end (hotel internet today). Aaron On Sat, Jul 13, 2013 at 7:53 PM, Vojta Jina notifications@github.comwrote:
|
Sounds good. I normally do create a branch power feature but with this one Aaron
|
This ensures that something is printed out for users who didn't add a mapping for one of their dependencies. Either they missed a deps.js file or they didn't preprocess all of their source files. The current behavior adds an undefined filepath which ends up causing the karma web-server to blow up when it trys to do indexOf on undefined.
I'm sure it would be better to actually get the real karma logger here, but I didn't see any examples of doing that in any of the other plugins. So for now I'm just using a console.error.