-
Notifications
You must be signed in to change notification settings - Fork 9
Refactor/backend #90
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
base: main
Are you sure you want to change the base?
Refactor/backend #90
Conversation
There's no need to prepend the user's code with Also, I'd rather not merge this until after the next release. I don't want to merge non-critical things until we test the release and push it to pypi. |
As I have already stated, these pull requests belong to ongoing type hint fix refactoring batches. They're not supposed to be merged right now.
Yup! File renamed, removed, purposefully typing wrong Python syntax to crash the file, etc. For all those experimental cases, p5mode plugin kept working normally w/ no apparent changes on its behavior! Seems like we don't need a Thonny backend hack anymore. :D |
Yes, and this PR is appreciated and is helpful. We also need to test the latest release candidate. Once we do a test of the release candidate on each OS we can do a release. I was hoping you and @villares could do the testing here since both of you use the plugin much more than I do. When you and @villares let me know the release candidate works fine on each OS we will be ready.
I'm fine with removing it but am reminded of Chesterton's Fence. Why was that code added in the first place? I feel like we are missing something. |
prefix = 'from py5 import *\n'
cmd['source'] = prefix + cmd['source']
cmd['row'] += 1 From the excerpt above, I believe it's just a hack to add 'from py5 import *\n' at the top of a sketch. But given run_sketch() already does that, we should get rid of this backend; given it hacks class MainCPythonBackend for all Thonny addons! |
This is the "thonnycontrib/backend/py5_imported_mode_backend.py" cleanup.
However, after some testings, I've concluded this file can be deleted and it won't change the plugin's behavior!
Basically, this file adds 'from py5 import *\n' to a py5mode sketch.
But it seems like library py5 is somehow already doing that!
Therefore, my advice is to fully delete this "backend" folder from this plugin project!
#89