-
Notifications
You must be signed in to change notification settings - Fork 129
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
app: manifest: Add the ability to display untracked files and directories #786
Conversation
57e511a
to
1bebb88
Compare
1bebb88
to
b9a6fe7
Compare
e83593d
to
7daa628
Compare
29cb8fe
to
c4c73a0
Compare
Thanks @marc-hb for the review! Will address those comments soon! |
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.
I think adding some pydoc is more important and useful than usual considering the lack of... test :-) Just some suggestions below, please rephrase better.
(It's not a critical feature so I'm fine with the lack of test)
c4c73a0
to
e06d649
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.
I tend to have a lot of untracked stuff in one workspace so I gave this a very quick try. Seems to work but I found one annoying issue: symbolic links are resolved in the display :-( Could you avoid that?
west manifest --untracked
../other_workspace/real_repo # resolved symbolic link
crosstool-ng # plain directory, expected
crosstool-ng/builds/xtensa-apl-elf # more resolved symlinks
crosstool-ng/builds/xtensa-byt-elf
crosstool-ng/builds/xtensa-cnl-elf
The logging with west -vv manifest --untracked
is unexpected: It starts with prefixes but the new statements miss them?!
west.manifest: DEBUG: resolving self import submanifests
west.manifest: DEBUG: found submanifest directory: submanifests
west.manifest: DEBUG: resolved self import
_find_untracked in: /home/me/WS
processing folder: /home/me/WS/.west
processing folder: /home/me/WS/acpi-scripts
Code LGTM! I hoped the pydocs could be in a better English but they're OK ;-D
Indeed, will fix |
e06d649
to
665c1ec
Compare
Agreed on the addition here, besides that I sometimes edit the |
5d341c7
to
9756362
Compare
9756362
to
fa89a3f
Compare
No, because You should try it, it's a one-line change |
The most basic test would have found that.
I don't see why sorry. Maybe we don't need a test for this example specifically, but the number of discussions about corner cases and specifying their behavior changed my mind and convinced me this feature is complex enough to require at least one test to get it started. It's really not that simple of a feature. |
OK, I was referring to your earlier proposal using But I have to agree with you that, while I do not share your view, I can understand why others would prefer your approach, that's why I've asked or additional opinions.
Completely agree here. I am working on a basic test. |
They operate on the list of
Fair.
This sounds like the manifest is a very static thing and this just reminded that because of
Curious how this new feature deals with partial and changing imports.
If it is really just a one-line change (not 100% sure of that yet), then maybe we could have both based on some additional flag? I don't mind which one we get first and what the default would be. BTW, did you ever consider and discuss a brand
Thank you! That has become my biggest concern now. |
@marc-hb another reaon why I don't like operating on Alternatively, the only viable option to this is CC @pdgendt. |
@marc-hb I also spoke to @joerchan, who wrote the initial proposal for this feature.
Instead, we have agreed that we could add a |
fa89a3f
to
cf82fef
Compare
cf82fef
to
b3da602
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.
s/folders/directories/
and s/folder/directory/
😅
fc20c78
to
f0d5513
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.
Re-approved
@carlescufi I know you've been looking for this feature for a long time. Thanks for making the effort to work on it. Given that a lot of the discussion centered around the behavior related to symlinks, I think it would make sense to have at least some basic coverage of the behavior of this command when symbolic links are encountered. Since that is not always possible on Windows, I would recommend a separate test function like this: @pytest.mark.skipif(sys.platform.startswith("win"), reason="symbolic links not tested on Windows")
def test_manifest_untracked_with_symlinks():
# basic test coverage for desired behavior identified by yourself and marc-hb goes here (see https://docs.pytest.org/en/7.1.x/how-to/skipping.html) I'm not going to -1 over this, but I think it would give us all some peace of mind to bite the bullet and get those tests in. |
f0d5513
to
e7b75a1
Compare
Thanks @mbolivar for the suggestion. I've implemented it now and avoided running it on Widows as you suggested, because you do need to enable developer mode or run an elevated terminal to be able to run the symlink tests on Windows. |
e7b75a1
to
e91dfe8
Compare
This new command-line switch implements something similar to `git status`'s untracked files display. The code examines the workspace and prints out all files and directories that are not inside of a west project. Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
e91dfe8
to
eac8dbc
Compare
|
Fixes: #622
Supersedes #702