-
Notifications
You must be signed in to change notification settings - Fork 639
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
syscall_stub_gen_rs.py looks broken, is this used anywhere at all? #1223
Comments
This script is not used in https://github.com/seL4/rust-sel4 |
So, if there is no maintainer for this to fix it, deleting might be the best option? |
It uses |
Yeah, from what I recall Kent is correct, at the time those changes were made I had tested it. However that stub_gen_rs was not changed to make any use of the conditions and before that it was only able to generate for a single kernel configuration. But I didn't want to change the output from underneath anyone, and being unsure how it was used, I just left it alone. |
(@ratmice thanks for checking that it was still working at the time!) As far as I can tell, it does make use of the conditions, eg for seL4_TCB_Configure below:
|
Thanks for checking. So given Nick's project is not using this script, does it have any test coverage anywhere? Does Nick's project produce something similar that might be the preferred artifact to use? Or should it use this, so we can ensure what this script produces can be used? |
I believe Nick may be using the following: I tried to do a little bit of spelunking, but didn't come up with much, iirc these were part of a project here, all those repositories now redirect to google, but I couldn't find any evidence of the syscall_stub_gen_rs.py having https://opensecura.googlesource.com/sw/cantrip/userland/+/refs/heads/master/apps/system/components/cantrip-os-common/src/sel4-sys/tools/syscall_stub_gen.py I wasn't able to check this repository out:
But this repo on the same site pre-dates the inclusion of the I should also mention that these all repos all appear to have recent activity on them, so it seems unlikely to me that this script is actually being used anywhere |
Yes, the approach taken by https://github.com/seL4/rust-sel4 is quite different. The output of the code you linked is not meant to have meaning outside of the context of the |
Overall I would in general be in favor of deprecating this in favor of Nick's code if it really isn't used anywhere.
Notes about getting deprecation output visible:I believe the intent of this script is to be executed from within build.rs. *build.rs when run from cargo suppresses stderr and stdout, so it is likely that deprecation warnings
emitting to stdout shouldn't be a problem since it appears to write code to a file rather than stdout. |
With the current script for
and this generates
where this should be
instead. |
Also, from CMake we get |
This file is still used by CantripOS by my understanding. As discussed in the original PR #733, we accepted pulling this module as a separate file that could directly depend on the original syscall_stub_gen.py and stay closer in sync with updates to the xml files while trying to avoid any ongoing maintenance burden. It should largely be able to be ignored unless we decide to remove the original syscall_stub_gen.py script and fundamentally change the approach taken for describing the seL4 user ABI. |
@kent-mcleod As far as I can see though, they still use the their own script1 called from here2. I think it is what they originally submitted that became sycall_stub_gen_rs.py) hosted in their own repository. (this is the TLDR of my comment here): #1223 (comment) Footnotes
|
I wonder if
libsel4/tools/syscall_stub_gen_rs.py
from PR #733 is broken since PR #789 changed the conditionals from XML attributes to tag. The change was applied for the C-header generator, but not for the Rust generator.@nspin: is this tool used anywhere in your rust support? In case the script is broken, should we delete this of fix it?
See
The text was updated successfully, but these errors were encountered: