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
Recent Emscripten versions no longer work on Netlify builders #12896
Comments
We dropped support for python 2 back in the 2.0.0 release: #11836. Is it possible that error you are seeing is from a machine running python 3 but < 3.6? We did more recently start python f-strings which is that first time we broke compat with python < 3.6. The plan to move to python3 has been long time in the making: #7198. If we had good reason we could consider lowering the bar from python 3.6 to python 3.5? Or we could embed the whole of python in the same way we do on mac and windows. The assumption had been that modern linux users all have access to recent python3 version, but maybe that was a bad assumption? I'm not familiar with Netlify, do you have any control there over the linux distro used? |
You don't have any control over the build environment on Netlify as far I as I know. I think supporting Netlify deployment is a pretty strong argument FWIW :-) Here's the full log from Netlify building https://github.com/bmeurer/emscripten-dbg-stories:
|
I don't know anything about Netlify but I find it really hard to believe that any kind of CI/CD system today wouldn't support python3. I mean its kind of unthinkable isn't it, given that python2 is long past end of life and unsupported upstream? I don't mind investing in other solutions such as bundling our own python3 linux binary if we really have to.. but we should at be really sure that we have investigated all possible options with Netlify first. Unfortunately I know nothing about Netlify so I don't feel very qualified to do that part but I'm happy to try if you would like. If possible could you investigate further with them (possibly reach out to them) before re-escalating here if all else fails?
|
From the looks the docs it certainly look like it should be possible to specify which version you want: https://docs.netlify.com/configure-builds/manage-dependencies/#python |
Ah, setting |
Every other platform expects you to choose the right OS distribution, software versions, etc. Though raising an error at the beginning if the Python version isn't high enough would be a good change. |
We do report and error nicely at the beginning, but because f-strings are syntax error we don't get a chance in this case: Line 23 in dfb6fda
To make this check more useful it would need to be done in the calling process... before we actually run python. We could do that if we decide its worth the effort but we have had very few reports so far about the python transition causing problems. If its OK with you, we can close this bug and re-open to try to add better reporting if we get more reports of folks who run into trouble. While the error we see here is not very clear.. its also not completely in-actionable, and it only effects linux users (not mac or windows) who tend to more savvy (hence the fact the we don't bundle a python for them but expect them to install it themselves):
|
Your call. But I'd like to call out that this doesn't just affect linux users, but generally folks deploying to Netlify, and I assume that the majority of those are probably actually mac users. :-) |
Perhaps we should add an FAQ entry for this, at least? Btw, I get a different error trying to run in python2, I don't even get to the f-string which is in emscripten.py,
So if we want to mention this in the docs somewhere, we may want to mention both errors. |
I think @kripken you are seeing the error one gets with python2. I suspect that the original bug was reported on a machine running python 3.5 (which support the print function but not the f-strings). Even though netlify is reporting |
One problem with the obvious solution of adding Another possible solution: Add another tiny python script that is valid python2 which checks the version before importing the real emcc.py. But we would need to do this for every single entry point so it also a little tricky. |
If emcc.py was kept to a lower Python syntax requirement (3.0?) then you could catch a |
But emcc.py is huge so we would not want to restrict that file. I was thinking a smaller launcher that had lower requirement. Also, we have at least 10 different python entry points so ideally any solution would work for all entry points. |
Context: #12896 Also some minor drive-by fixes that I noticed.
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 30 days. Feel free to re-open at any time if this issue is still relevant. |
Looks like we broke compatibility with Python 2.7 (as provided by Netlify builders):
The text was updated successfully, but these errors were encountered: