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

Add support for Groovy based migration scripts #27

Merged
merged 6 commits into from
Sep 16, 2022

Conversation

tcrespog
Copy link
Contributor

Closes #26.

Copy link
Contributor

@pditommaso pditommaso left a comment

Choose a reason for hiding this comment

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

Looks neat 👍 Just a minor comment

@tcrespog
Copy link
Contributor Author

Now that I see tests having to do with native compilation failing... I think Groovy support is incompatible with native compilation, especially to the extent that we want to use it (run any scripts) 😞.

@pditommaso
Copy link
Contributor

The guru here is @jorgeaguileraseqera!

@jorgeaguileraseqera
Copy link
Contributor

I don't think Graalvm will allow GroovyShell execute arbitrary code

With some little effort, I was able to run the groovy code in a native way but when the GroovyShell parses the resource it fires an Exception:

No classes have been predefined during the image build to load from bytecodes at runtime

@tcrespog
Copy link
Contributor Author

tcrespog commented Sep 16, 2022

Thanks for looking into it, Jorge.

With some little effort, I was able to run the groovy code in a native way but when the GroovyShell parses the resource it fires an Exception

What a pity! However, I think it's acceptable so long as we are aware of the limitation. As long as SQL scripts run fine using the native image, we could live with that.

@pditommaso
Copy link
Contributor

Check the paragraph "Mixing AOT and JIT"

https://medium.com/graalvm/java-on-truffle-going-fully-metacircular-215531e3f840

@pditommaso pditommaso merged commit 9a15e10 into master Sep 16, 2022
@pditommaso pditommaso deleted the issue-26-groovy-migrations branch September 16, 2022 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for groovy based migration script
3 participants