-
Notifications
You must be signed in to change notification settings - Fork 7.3k
[DNM] rust: add comment support to DTS parser #89420
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
Draft
pillo79
wants to merge
6
commits into
zephyrproject-rtos:main
Choose a base branch
from
pillo79:ed_line_and_file_info_rust
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[DNM] rust: add comment support to DTS parser #89420
pillo79
wants to merge
6
commits into
zephyrproject-rtos:main
from
pillo79:ed_line_and_file_info_rust
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The phandle property is auto-generated when parsing the DTS, so there is no 'source information'. This commit sets the filename and line number of the phandle property to be the same as the first reference to the target node. Signed-off-by: Luca Burelli <[email protected]>
List each element of a property array in a different line to improve readability of the generated output. Update the exepected output of the tests accordingly. Signed-off-by: Luca Burelli <[email protected]>
Output lineno/filename as comments in the string representation of a DT to help with debugging DT issues. Also, remove the added comments when comparing the string representation of a DT to a reference string in the DT testsuite. Signed-off-by: Benjamin Cabé <[email protected]> Signed-off-by: Luca Burelli <[email protected]>
The root node is the first node in the DTS string representation, and is currently separated from the headers by two empty lines. Adjust the spacing so that only one line is printed in all situations. A small adjustment is added to the test suite to keep the current expected outputs unchanged. Signed-off-by: Luca Burelli <[email protected]>
This commit allows comments to reference files with paths that are relative to the Zephyr workspace root. This is done by adding a new argument '--workspace-dir' to the 'gen_edt.py' script, which is passed to the 'EDT' and 'DT' classes and used instead of the current working directory. The workspace directory is set to WEST_TOPDIR if West is in use, otherwise it is set to the parent directory of ZEPHYR_BASE so that Zephyr files have a 'zephyr/' prefix. Signed-off-by: Luca Burelli <[email protected]>
The following west manifest projects have changed revision in this Pull Request:
⛔ DNM label due to: 1 project with PR revision Note: This message is automatically posted and updated by the Manifest GitHub Action. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
DNM (manifest)
This PR should not be merged (controlled by action-manifest)
manifest
manifest-zephyr-lang-rust
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR tests the change in zephyrproject-rtos/zephyr-lang-rust#96 that filters comments in DTS files with the new DTS comments implemented in #89410 (the first 5 commits).