-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for robotframework #295
Comments
Hi @vehovsky, thank you for your interest in GraalPy. I tried to run
I'll keep you updated on the fixes. |
We have fixed both of those issues. Could you please try your use cases with a snapshot build? |
Latest snapshot I see now is [GraalVM CE 23.0.0-dev-20221103_2324] released 12 days ago. Tried it and still see the same issue.. |
Oh, you're right, I'm sorry. The builds are supposed to be done daily, but there are apparently some failures. I notified our release engineering |
A new build is there and I checked that it contains the fixes. Please try that one |
Hi, must say, looks pretty promising! 👍 I was able to run successfully quite a lot of the Robot Framework acceptance tests. Quite a lof of those failures were caused by:
I did not see such issues in the Jython execution (plenty of different issues there), so unclear to me if that is something that can be fixed in Graal? I've also tried executing the RF tests from Java, that worked. Including Java library and using keywords written in Java is another story. It would be great if someone like @pekkaklarck could have a look at it. Here is what I tried, very basic:
Performance wide, far from native Python, but quite faster than Jython (not exactly a fair comparison.. but anyway) Complete RF acceptance tests results: |
Thank you for the nice summary 🙂
It looks like something that should be fixed on our side, but I cannot say for sure just from the traceback. Could you please post a command how to run one such test individually? I'll try to debug the problem |
Thanks for looking into this. What I've done is to grab the 4.1-maintenance sources. Then if you want to execute just single test, use this option
Example:
Output:
|
Just to provide an update - we've been actively looking at the failures and fixing the most common ones. I think next week we should have a new snapshot for testing. |
This looks really interesting! Some quick comments:
|
Thank you for the comments.
I tried to look at the 4.1 branch and the Java detection there is too Jython-specific - it outright expects the name in
It seems to run quite fine already. I'll have to play a bit with how the Jython integration worked, I haven't really tried it much so far. We can make Java classes look like Python's to some extent, but there will always be limitations, like for example you wouldn't be able to add type annotations on a Java method. I expect we will always need at least a thin python wrapper around the actual Java library object.
We have already added |
@vehovsky A new snapshot with fixes should be available. Could you please give it a try again? |
It definitely sounds like we should forget the old Jython specific library API and write a new one for GraalPython. The more the Java classes look like normal Python classes the easier that is. Having some Java/Graal specific code isn't a problem. How is Java type information available currently? I assume it cannot be in |
I think the way to go about obtaining type information would be to use the Java reflection APIs from python, i.e. to call Example: def get_method_types(clazz, method_name):
overloads = []
for method in getattr(clazz, 'class').getDeclaredMethods():
# will return just the first overload
if method.getName() == method_name:
overloads.append(method.getParameterTypes())
if not overloads:
raise AttributeError(method_name)
return overloads
import java
types = get_method_types(java.type('java.lang.StringBuilder'), 'append')
for overload in types:
print([t.getSimpleName() for t in overload]) It prints:
|
Hi @msimacek, I've tried running again all the the Robot Framework acceptance tests on 4.1-maintenance branch. And the results are pretty impressive! I'll try to run the acceptance tests now also on the latest stable version of RobotFramework 6.0.1 and get back to you with the results. |
Thank you for the results. I think the lxml tests could run too if you install
so it doesn't get installed on graalpy by default. |
Thanks for the tip. Here are my results for acceptance tests on RobotFramework 6.0.1
Looks very very good to me. What do you think @pekkaklarck? Thank you @msimacek! |
Do I get it right that with GraalPython you get 75 failures and with CPython you get 160? The former number is really promising. There likely are tests that would need to be updated to take GraalPython into account and tests for optional dependencies (e.g. 160 tests failing with CPython is strange because all tests should pass. Have you looked at why they are failing? If there's some system level dependency missing, that could also affect GraalPython execution. Anyway, there clearly has been awesome progress. I need to install latest GraalPython version myself and run test myself so that it's easier to debug them. Unfortunately I'm super busy right now, but I hope I'd have time for that after Christmas or latest early next year. If things look good enough, we could add official GraalPython support into RF 6.1 scope. It wouldn't contain the Java library API, but we can start discussing about that as well. Update: I took a quick look at the provided CPython results and majority of the failures are due to |
@pekkaklarck you are right, sorry about that, still 34 failing though.. |
I would like to start this issue mainly to see interest for the support in robotframework community.
Ever since RoboCon 2021 GraalVM Python was on our radar as potential replacement for Jython. Seems the progress since then was very limited. After talking to @steve-s recently on GeeCon 2022 I understand GraalVM Python developers were not aware of such use-case and that might be the reason why there was minimal progress.
I've tried basically the same as robotframework-after-jython with latest GraalVM 22.3.0
Which I tracked to robotframework/robotframework#4100:
The text was updated successfully, but these errors were encountered: