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

Static with class definition fix. #597

Merged
merged 4 commits into from
Nov 24, 2022
Merged

Static with class definition fix. #597

merged 4 commits into from
Nov 24, 2022

Conversation

sampottinger
Copy link
Collaborator

@sampottinger sampottinger commented Nov 12, 2022

Closes #579:

It looks like Processing 3 was a bit more eager to try to put the user in static mode. I’m not 100% sure but I think this might have accidentally caused some undesired wrapping previously. Regardless, I replicate the 3x behavior while still supporting Java mode by:

  • Try matching static mode before Java mode.
  • If there is ambiguity, check for main in the root object provided by the user.
  • Check if the user is trying to import processing core manually and avoid double import of automatic includes.

This PR adds tests both from #579 and also a new test where the mode is ambiguous but root object includes a main method.

@sampottinger sampottinger marked this pull request as ready for review November 12, 2022 17:54
@sampottinger
Copy link
Collaborator Author

I think this is ready for you @benfry!

@sampottinger
Copy link
Collaborator Author

sampottinger commented Nov 12, 2022

… Just to be sure, quick checked this on a fresh linux machine and it worked!

Static Test

@benfry benfry merged commit 42f1484 into main Nov 24, 2022
@benfry benfry deleted the static-mode-object branch November 24, 2022 23:01
@benfry
Copy link
Owner

benfry commented Nov 24, 2022

Thanks!

benfry added a commit that referenced this pull request Nov 24, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

function/variable "does not exist" errors reported if trying to define a class without setup/draw
2 participants