Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

Not Clear How to Get Custom Controller To Be Recognized #128

Closed
nottoseethesun opened this issue Oct 7, 2013 · 7 comments
Closed

Not Clear How to Get Custom Controller To Be Recognized #128

nottoseethesun opened this issue Oct 7, 2013 · 7 comments
Assignees

Comments

@nottoseethesun
Copy link

The best I can come up with so far is barely acceptable:

cp /Users/test/arrow-foo/foo-page-load/test-foo-load-controller.js /usr/local/lib/node_modules/yahoo-arrow/lib/controller/test-foo-load-controller.js

That is the only way I can get my custom controller to execute.

If I simply put the path to the controller in my test-descriptor.json, then the console log output tells me that it has loaded the controller, but it never executes it. The other controllers, such as Locator, always have console output log lines that show both loading and execution.

At the least, the "loaded" console log line for the custom controller is incorrect, or there should be some hint of an error message as to why the custom controller doesn't execute.

I think that also, there is a bug where local custom controllers are not read.

Please fix and advise.

@pranavparikh
Copy link

Hi Christopher,

Can you please send your test files and controller files ? Let me try to reproduce it and get back to you.

Thanks

@nottoseethesun
Copy link
Author

Where should I send them? I have a tarball ready to go.

Note that the problem would occur when I would give a normal filepath to the local controller.

@pranavparikh
Copy link

You can upload files here - https://gist.github.com/ and send me the link.

@nottoseethesun
Copy link
Author

@nottoseethesun
Copy link
Author

I found that the problem exists under arrow installed locally and also when installed globally: The absolute path to the custom controller file must always be given. This is sub-optimal, and very misleading, since the client-side test is found via a relative path just fine, and to top it off, the console log reports that it is loading the (not loaded) custom controller.

@proverma
Copy link

thanks for the debugging @christopherbalz , we dont recommend global install of arrow, but I agree the behavior should be consistent btw lib and controller. we will look into that, and also improver our console log/ error messages. Lets target those fixes for v85 release.

Did you know about out auto scanner for lib and controller : https://github.com/yahoo/arrow/blob/master/docs/arrow_cookbook/arrow_in-depth.rst#auto-scan-share-libraries-and-controllers

if you dint, please have a look, and let me know of you find it helpful ?

@ghost ghost assigned proverma Oct 15, 2013
@nottoseethesun
Copy link
Author

Thanks on the upcoming fix.

And also, thanks on '--lib': That would be good to use.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants