-
Notifications
You must be signed in to change notification settings - Fork 64
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
Fix windows #2424
Fix windows #2424
Conversation
You can trigger the Windows/macOS platforms by manually triggering the workflow. We had disabled them because everyone was perpetually watching progress bars. A manual run revealed there are still problems with Python and TypeScript on Windows. The TypeScript failure is sus and might be a nondeterministic one. @vinzbarbuto, the Python failure has to do with paths:
|
I’m not sure what’s causing this error. It looks like it’s related to the path resolution, but I’m wondering why it didn’t happen in the other test we ran. Maybe it has something to do with the Windows path? How can I reproduce this error? |
It's the |
Yes, it seems to be the Windows path issue. Do you know how I can reproduce the error on macOS so I can fix this? |
Nope. If you have no access to a Windows machine, your best bet would probably be to guess and debug in CI. |
The path issue has been resolved, but other issues remain (including the one this PR meant to address, it seems). See: https://github.com/lf-lang/lingua-franca/actions/runs/11308047484/job/31450473838 |
I believe the problem outlined here is related to federated execution on Windows. To test the new import statement, I added:
However, since Edward moved |
Sorry, I do not understand what you mean. Does it mean that you can fix it? 😄 |
Yes, @edwardalee said:
Therefore, we should place all federated tests in the Failed: src\lingo_imports\FederatedTestImportPackages.lf in 0.00 seconds The solution could be either to add this test to the |
OK, please go head 👍 |
Done. This should solve at least the Python tests |
bcc08c9
to
b03cb18
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. But not sure if there is anything we can do about variable length arrays on Windows. This blog post says that even if the support C11 and C17 they will not support variable-length arrays.
Astute readers will note that VLAs are also not supported. Variable length arrays are generally less efficient than comparable fixed sized arrays, and generally inefficient compared to equivalent malloc(), when safely and securely implemented. VLAs provide attack vectors comparable to those of the infamous gets() — deprecated and destined to removal — for opportunities of “shifting the stack” and other exploits. For these reasons we intend not to support VLAs as an optional feature in C11.
https://devblogs.microsoft.com/cppblog/c11-and-c17-standard-support-arriving-in-msvc/
The question has been posed before, but, do we really need Windows-support?
For some reason, Windows tests are disabled for PRs, which results in a bunch of recent merges that are incompatible with Windows. This is an attempt to get things working again in master. However, this PR is also not running Windows tests, so I don't know how to test whether this solves the problem. Apparently, the Windows tests are only run if you push something to reactor-c (see test failures here).
Pathetically, we seem to be using an antique C compiler in Windows that does not support C99, in particular, variable size arrays on the stack. The
test/C/src/Mutable.lf
has to use a constant rather than a parameter for a mutable multiport input. To implement this without variable size arrays on the stack would be very painful. It would have to be malloc'd, and some sort of special hook would have to be added to free it. Can we upgrade the C compiler on Windows instead?