Repository navigation
Support list of instances at ROBOT_LIBRARY_LISTENER - #1995
Conversation
|
Admin, can CI be enabled? |
There was a problem hiding this comment.
Testing just against Python list has a problem that Java libraries cannot register a list of listeners. We have utils.is_list_like that could be used here instead, but it has a potential problem that a listener itself could be iterable. I guess iterable listeners are rare enough that this isn't a big problem. If someone actually faces that problem, they can wrap the iterable listener into a list.
|
|
Thanks for your valuable inputs @pekkaklarck. Will try to improve the PR over this weekend. |
|
I've updated the PR with changes regarding your comments. The commits are a little mess, but I can rebase before the merge anyway. I have two questions:
|
|
|
1 & 2. Will try to improve the User Guide to make that clear. 3 . Forgive me as I'm mostly a Java newbie. But it matter how do I compile those classes (compiler, and version)? My goal is to push a |
|
There's |
|
Compiling (using jython2.7) with |
|
Using 1.5 is definitely OK in this PR. If you want, you can create a separate PR updating version to 1.7, but we can just do that ourselves too at some point. Let me know when this PR is ready for a final review. We try to get RF 2.9a2 released early next week. |
When importing a user library the ROBOT_LIBRARY_LISTENER attribute is used to register an instance (usually the library itself) as a listener. It is now possible to either set this attribute to a single instance, or a list of instances. If a list is provided, all elements will be registered as listeners.
|
I've fixed the java files, updated the user guide and squashed commits. I thinks this is now ready for a final review. Did this ran over your CI environment? Once this is merged, I'll be happy to provide a PR updating all java compiled as mentioned before. |
|
Our CI is down right now. We'll review and hopefully merge this on Monday. |
|
The PR looks great! Would you @vkruoso still like to add yourself to AUTHORS.txt in project root? No need to squash again if you don't want to. I can also add you there myself after merging this. |
|
I wont be able to do it in the following days, so if you can do it after the merge would be appreciated. :) |
Support list of instances at ROBOT_LIBRARY_LISTENER. Fixes #1970.
|
Ok, I'll update AUTHORS. Thanks for the great PR @vkruoso! |
|
Thanks for the merge. I'll try to to provide the PR with updated java compiled code as soon as I have a little time for it. |
Recompiled java code with 1.7 (support for Jython 2.7). As discussed in comments of PR #1995, it would be better/cleaner to compile Java code when tests are run, but that would require some changes to our acceptance testing infra. A bigger problem would be that automatic compilation would require JDK and thus running tests with Jython just on JRE wouldn't be possible.
This is a pull request for issue #1970.