Closed krzema12 closed 2 years ago
Starting with exposing a flag that makes the box tests use micropython
binary.
Using MicroPython in e2e tests fails with:
Traceback (most recent call last):
File "python/e2e-tests/out/python-consumer.py", line 1, in <module>
File "/home/piotr/repos/priv/kotlin-python/python/e2e-tests/out/compiled.py", line 12986, in <module>
MemoryError: memory allocation failed, allocating 26032 bytes
At this line, there's:
def invokeSuspendSuperTypeWithReceiverAndParam(self, receiver, param, completion):
raise NotImplementedError('It is intrinsic method')
I think using MP in e2e tests has to be postponed until these MemoryErrors are solved.
Just thought about this: the issue might be about the implications of instantiating a NotImplementedError
. Maybe it's worth trying to raise a custom thing/error/exception to see what causes this?
Isn't that related to the cost of building the stacktrace? I don't know how that works in Python, but I wouldn't be surprised to learn that it works differently in MicroPython, or that it's just not supported.
Thanks, we'll investigate it in https://github.com/krzema12/kotlin-python/issues/84.
See #51.
Proposed goal: run box tests for MP next to regular Python, with separate report files. A separate Gradle task can be created:
microPythonTest
.84
85