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

PSM recompilation #154

Open
chungwong opened this issue Oct 5, 2021 · 2 comments
Open

PSM recompilation #154

chungwong opened this issue Oct 5, 2021 · 2 comments

Comments

@chungwong
Copy link

At this moment, saving a PSM main.py will trigger a full recompiling of current ST program
on this line https://github.com/thiagoralves/OpenPLC_v3/blob/master/webserver/webserver.py#L1739

I believe the full compilation is only necessary if the following two files are changed(Changing Hardware dropdown option in the web interface)

echo linux > ../scripts/openplc_platform
echo psm_linux > ../scripts/openplc_driver

on this file https://github.com/thiagoralves/OpenPLC_v3/blob/master/webserver/scripts/change_hardware_layer.sh#L100

If I am making changes to main.py directly on the web interface, it will definitely trigger the full compilation which is quite slow especially we are making lots of changes to main.py during dev.

Does it mean I am better to modify the file via SSH to bypass the compilation?
Or Am I completely wrong and the compilation process is necessary no matter what?

@thiagoralves
Copy link
Owner

Indeed, the recompilation process for PSM is not needed if all you're changing is the main.py file. The hardware tab is generic so that whatever changes to hardware settings will cause a full recompilation. If you edit the python file directly (either from terminal, text editor, ssh, whatever) you will skip the recompilation process and that should work just fine

@thiagoralves
Copy link
Owner

I'll keep this issue open so that in the future I can (or someone else) make the hardware tab a little smarter so to identify when a recompilation is truly necessary.

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

No branches or pull requests

2 participants