-
Notifications
You must be signed in to change notification settings - Fork 59
Not Clear How to Get Custom Controller To Be Recognized #128
Comments
Hi Christopher, Can you please send your test files and controller files ? Let me try to reproduce it and get back to you. Thanks |
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. |
You can upload files here - https://gist.github.com/ and send me the link. |
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. |
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 ? |
Thanks on the upcoming fix. And also, thanks on '--lib': That would be good to use. |
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.
The text was updated successfully, but these errors were encountered: