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

Simplify GraalPy starter #8

Merged
merged 1 commit into from
Oct 9, 2024
Merged

Simplify GraalPy starter #8

merged 1 commit into from
Oct 9, 2024

Conversation

timfel
Copy link
Contributor

@timfel timfel commented Oct 9, 2024

Using GraalPyResources is wrong and broken when no packages are actually used (because filelist will be missing), and since we have no Gradle plugin this cannot work correctly, yet, as soon as any user modifies the code to import some standard library it will just break. Simplify the starter to make this not happen.

@timfel timfel requested a review from fniephaus October 9, 2024 08:53
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 9, 2024
@timfel timfel requested a review from msimacek October 9, 2024 08:53
msimacek
msimacek previously approved these changes Oct 9, 2024

public class App {

public static void main(String[] args) {
try (Context context = GraalPyResources.createContext()) {
try (Context context = Context.create("python")) {
Copy link

Choose a reason for hiding this comment

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

Should we add options for allowing IO/native/threads/etc and importing site? Maybe commented out with explanation "if you need X, uncomment Y"

@timfel timfel merged commit faa4d3d into main Oct 9, 2024
5 checks passed
@timfel timfel deleted the tim/fix-graalpy-starter branch October 9, 2024 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants