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

Registering SliceVectorMethodGen for reflection #3737

Merged
merged 6 commits into from
Sep 27, 2022

Conversation

JaroslavTulach
Copy link
Member

@JaroslavTulach JaroslavTulach commented Sep 26, 2022

Pull Request Description

Each builtin makeFunction method has to be currently registered for reflection. Adding registration of SliceVectorMethodGen to make following example work ag

enso$ sbt engine-runner-native/buildNativeImage
enso$ ./runner --run engine/runner-native/src/test/resources/Factorial.enso 6

Important Notes

Regression caused by #3724 - Once the above code is executed in the CI, we'll discover such breakages before integration.

Checklist

Please include the following checklist in your PR:

  • The documentation has been updated if necessary.
  • All code conforms to the
    Scala,
    Java,
    and
    Rust
    style guides.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed: Enso GUI was tested when built using BOTH
      ./run ide build and ./run ide watch.

[ci no changelog needed]

@JaroslavTulach JaroslavTulach added the CI: Ready to merge This PR is eligible for automatic merge label Sep 26, 2022
@JaroslavTulach JaroslavTulach self-assigned this Sep 26, 2022
@JaroslavTulach JaroslavTulach requested a review from 4e6 as a code owner September 26, 2022 06:04
@JaroslavTulach JaroslavTulach changed the title Each builtin makeFunction method has to be registered for reflection now Registering SliceVectorMethodGen.makeFunction method for reflection Sep 26, 2022
@JaroslavTulach JaroslavTulach changed the title Registering SliceVectorMethodGen.makeFunction method for reflection Registering SliceVectorMethodGen for reflection Sep 26, 2022
@JaroslavTulach
Copy link
Member Author

JaroslavTulach commented Sep 26, 2022

@hubertp, we could avoid listing the builtins in the reflect-config.json file, if we could read the config files and instantiate the nodes during build time - e.g. in some static class initializer. That way the reflection would be done before native image is generated - that would also decrease the size of the generated image, as the code for loading the config files wouldn't even be there.

... sounds like a good idea.

Reported as a story.

Copy link
Collaborator

@hubertp hubertp left a comment

Choose a reason for hiding this comment

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

@JaroslavTulach sounds like a good idea.

@mergify mergify bot merged commit 3239815 into develop Sep 27, 2022
@mergify mergify bot deleted the wip/jtulach/FixNativeImage_182880080 branch September 27, 2022 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants