BUPT-OS / RROS

RROS is a dual-kernel OS for satellites or other scenarios that need both real-time and general-purpose abilities. RROS = RTOS (Rust) + Linux (C).
https://bupt-os.github.io/website/
Other
570 stars 40 forks source link

fix:modify the generate_rust_analyzer to delete useless makefiles #58

Closed forever-philo closed 1 month ago

forever-philo commented 1 month ago

The PR #55 points out that generate_rust_analyzer.py cannot function properly when the Makefiles are missing. This is due to the lack of handling for the case where the Makefile does not exist. The relevant code is as follows: https://github.com/BUPT-OS/RROS/blob/129975ae0600ba00a548ac411591c60d291c807c/scripts/generate_rust_analyzer.py#L98-L119 The code attempts to open a file without checking for the existence of the Makefile, resulting in a FileNotFoundError when generating the rust-project.json for rust-analyzer. Since the Makefile in these directories serves no other purpose, I think handling the absence of Makefiles through exception catching is a better choice than providing empty Makefiles. The changes are as follows. That's all.Thanks.