Skip to content
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

Executing (parts of) Truffle TCK with Enso values #8685

Merged
merged 26 commits into from
Jan 12, 2024

Conversation

JaroslavTulach
Copy link
Member

@JaroslavTulach JaroslavTulach commented Jan 5, 2024

Pull Request Description

Initial steps to fix #5238. With a little work we have more than two hundred of new tests verifying if Enso values behave as good Truffle citizens and support polyglot interop the right way.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • All code follows the
    Java,
    style guides. All code has been tested:

@JaroslavTulach JaroslavTulach added the CI: No changelog needed Do not require a changelog entry for this PR. label Jan 5, 2024
@JaroslavTulach JaroslavTulach self-assigned this Jan 5, 2024
@JaroslavTulach
Copy link
Member Author

Looks like we have 500+ more tests and five failures to fix.

@JaroslavTulach
Copy link
Member Author

7312324 is the first fix done to align Enso with the behavior expected by TCK. Character should become Text, not a number.

@JaroslavTulach
Copy link
Member Author

JaroslavTulach commented Jan 9, 2024

There is this Cannot load edition 2024.1.1-dev error which is not happening locally. Any ideas what it is caused by? CCing @hubertp , @Akirathan, @mwu-tow

Trying to mimic the problem with:

ENSO_VERSION=2024.1.1-dev ENSO_EDITION=2024.1.1-dev ENSO_RELEASE_MODE=false sbt  runtime/test

77deb71 - should be the fix.

@JaroslavTulach
Copy link
Member Author

Great now the tests run fine and we can see real TCK failures. There are problems with:

  • testIdentityFunction - we have lost identity of [object & number & hostObject] somewhere and returned number
  • testInvalidSyntax - we need to throw error sooner according to the TCK

plus a b = a + b
""").invokeMember("eval_expression", "plus");

return List.of(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we want to expand these values, expressions, constructors, etc. to cover other Enso types - not just NUMBER and STRING.

@JaroslavTulach JaroslavTulach merged commit 0e69527 into develop Jan 12, 2024
29 checks passed
@JaroslavTulach JaroslavTulach deleted the wip/jtulach/Tck_5238 branch January 12, 2024 06:21
mergify bot pushed a commit that referenced this pull request Jan 16, 2024
Since #8685, there is the following error (warning) message from JPMS plugin when building `runtime-test-instruments`:
```
[error] Returned (10): Vector(/home/pavel/.cache/coursier/v1/https/repo1.maven.org/maven2/org/graalvm/sdk/nativeimage/23.1.0/nativeimage-23.1.0.jar, /home/pavel/.cache/coursier/v1/https/repo1.maven.org/maven2/org/graalvm/sdk/word/23.1.0/word-23.1.0.jar, /home/pavel/.cache/coursier/v1/https/repo1.maven.org/maven2/org/graalvm/sdk/jniutils/23.1.0/jniutils-23.1.0.jar, /home/pavel/.cache/coursier/v1/https/repo1.maven.org/maven2/org/graalvm/sdk/collections/23.1.0/collections-23.1.0.jar, /home/pavel/.cache/coursier/v1/https/repo1.maven.org/maven2/org/graalvm/polyglot/polyglot/23.1.0/polyglot-23.1.0.jar, /home/pavel/.cache/coursier/v1/https/repo1.maven.org/maven2/org/graalvm/truffle/truffle-api/23.1.0/truffle-api-23.1.0.jar, /home/pavel/.cache/coursier/v1/https/repo1.maven.org/maven2/org/graalvm/truffle/truffle-runtime/23.1.0/truffle-runtime-23.1.0.jar, /home/pavel/.cache/coursier/v1/https/repo1.maven.org/maven2/org/graalvm/truffle/truffle-compiler/23.1.0/truffle-compiler-23.1.0.jar, /home/pavel/.cache/coursier/v1/https/repo1.maven.org/maven2/org/graalvm/sdk/polyglot-tck/23.1.0/polyglot-tck-23.1.0.jar, /home/pavel/.cache/coursier/v1/https/repo1.maven.org/maven2/org/netbeans/api/org-openide-util-lookup/RELEASE180/org-openide-util-lookup-RELEASE180.jar)
[error] Expected: (13): List(org.graalvm.sdk:nativeimage:23.1.0, org.graalvm.sdk:word:23.1.0, org.graalvm.sdk:jniutils:23.1.0, org.graalvm.sdk:collections:23.1.0, org.graalvm.polyglot:polyglot:23.1.0, org.graalvm.truffle:truffle-api:23.1.0, org.graalvm.truffle:truffle-runtime:23.1.0, org.graalvm.truffle:truffle-compiler:23.1.0, org.graalvm.sdk:polyglot-tck:23.1.0, org.graalvm.truffle:truffle-tck:23.1.0, org.graalvm.truffle:truffle-tck-common:23.1.0, org.graalvm.truffle:truffle-tck-tests:23.1.0, org.netbeans.api:org-openide-util-lookup:RELEASE180)
```

This PR removes this error message by providing appropriate `libraryDependencies` to `runtime-test-instruments`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid Enso/Python & co. interop problems by using Truffle TCK tests
4 participants