-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fixed errors (on aarm64 Macs) and deprecated syntax in C/CPP/TS targets #61
Conversation
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.
These changes look good to me. Thanks for the fixes, @AneesHl! In a separate PR (to not obfuscate the diff), please run lff
on these files to make sure the formatting is correct also. We should add a CI check for that as well (refer to the playground-lingua-franca
repo for how to do that).
Let's handle the formatting as a separate issue: #62. I can take care of that. |
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.
This is amazing work! Thank you for digging into this. This helps considerably with removing the deprecated target properties and syntax rules (lf-lang/lingua-franca#2209, lf-lang/lingua-franca#2202, lf-lang/lingua-franca#1675)
Currently, if the target declarationu uses a property that is not supported by the target, this is reported as a warning. This is problematic, as we and potentially users don't notice if a target property is not supported anymore. For instance, we had several uses of the `flags` property in the C tests although it was renamed. Also the benchmarks used properties that we removed (See lf-lang/benchmarks-lingua-franca#61). This PR converts the warning message into an error, adjusts the unit tests, and fixes some of the C tests. I opted for simply dropping the `flags` property, as apparently it wasn't required and not used for a while. In particular, some tests attempted to avoid optimization, which is not needed as we compile the tests in Debug mode (whithout optimization) anyway.
Currently, if the target declarationu uses a property that is not supported by the target, this is reported as a warning. This is problematic, as we and potentially users don't notice if a target property is not supported anymore. For instance, we had several uses of the `flags` property in the C tests although it was renamed. Also the benchmarks used properties that we removed (See lf-lang/benchmarks-lingua-franca#61). This PR converts the warning message into an error, adjusts the unit tests, and fixes some of the C tests. I opted for simply dropping the `flags` property, as apparently it wasn't required and not used for a while. In particular, some tests attempted to avoid optimization, which is not needed as we compile the tests in Debug mode (whithout optimization) anyway.
Currently, if the target declarationu uses a property that is not supported by the target, this is reported as a warning. This is problematic, as we and potentially users don't notice if a target property is not supported anymore. For instance, we had several uses of the `flags` property in the C tests although it was renamed. Also the benchmarks used properties that we removed (See lf-lang/benchmarks-lingua-franca#61). This PR converts the warning message into an error, adjusts the unit tests, and fixes some of the C tests. I opted for simply dropping the `flags` property, as apparently it wasn't required and not used for a while. In particular, some tests attempted to avoid optimization, which is not needed as we compile the tests in Debug mode (whithout optimization) anyway.
Many benchmarks were failing when executed locally on Macs with Apple Silicon. The reasons varied between the usage of incompatible types (
size_t
vs.int
), typos, missing header imports and deprecated syntax (e.g.int(5)
instead ofint=5
).Not all benchmarks were failing but I tried extend the improvements to all benchmarks wherever applicable.
However, one benchmark (
PiPrecise
) is still failing inC
/Cpp
on Arm Macs, but the reason is unrelated to the improvements in this PR and has to do with how theGMP
library/headers are built/included, and would probably be better investigated in a dedicated issue.Fixes #60