-
Notifications
You must be signed in to change notification settings - Fork 146
support 'west init --topdir' #854
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
base: main
Are you sure you want to change the base?
support 'west init --topdir' #854
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #854 +/- ##
==========================================
- Coverage 84.52% 84.43% -0.09%
==========================================
Files 11 11
Lines 3366 3379 +13
==========================================
+ Hits 2845 2853 +8
- Misses 521 526 +5
|
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.
Seems reasonable to me
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.
Looks good!
652408c
to
8a2e15e
Compare
I really want to review this one because I spent a lot of time on #774 and #775 but @thorsten-klein is just submitting way too much code, I can't keep up.
Can you give me a few more days? |
Sorry 🤞
Yes, sure 👍🏻 Thank you in advance for your time and input! |
a08dec0
to
99377aa
Compare
Seconded, and I'll take this opportunity to thank you for all your contributions @thorsten-klein. |
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.
Even though I'd prefer —topdir
was only compatible with -l
, this is not a blocking issue for me. Thanks!
Let's wait for feedback from @marc-hb, as he requested some more time. |
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 particularly useful when using --local
I downloaded this PR and tested the other, --manifest-url option and it does not seem to work for me. I ran out of time and did not try --local yet. I didn't look at the code either.
Describing directory nesting clearly and accurately is not easy - it is basically a "specification" except it has to be user-friendly too. So I will look at the code only when that "specification" is complete and unambiguous.
This help looks like the two last ones can be both used at the same time:
west init [-m URL] [--mr REVISION] [--mf FILE] [-o=GIT_CLONE_OPTION] [-t WORKSPACE_DIR] [directory]
But it's not actually possible:
FATAL ERROR: --topdir cannot be combined with positional argument [directory]
When using either separately, each one seems to have the same effect. So, there does not seem to be any new feature in the remote case, which means it's still not possible to west init
a manifest two levels down or more in the remote case? Is this an oversight? The help does not seem to say. I don't see why --local
would be more flexible than --manifest-url
. I would hope the --manifest-url
and --local
options work the same immediately after the git clone operation.
|
Thank you for the review 🙏
Yes, exactly. Nevertheless, in remote case those arguments that do the same are mutually exclusive (see error message you got).
This has already worked before in remote case, since the positional argument Thank you 👍🏻 |
99377aa
to
552f964
Compare
I think I have resolved all review comments in the code👍🏻 |
Has it? Please share one example of a
|
Yes, you are right. I will push my changes where I have added support for this and also some test. |
Added new argument for west init to specify the west topdir when initializing a workspace from a remote or local manifest.
552f964
to
67306db
Compare
Fixes #774 (Successor of #775)
This PR introduces a new
--topdir
option forwest init
, allowing users to explicitly specify the west workspace directory (topdir) during initialization.This is particularly useful when using
--local
, as the current behavior always sets the parent of the given directory as the topdir. In addition, west is currently unable to determine bothmanifest.path
andmanifest.file
from a singledirectory
argument as the path can be interpreted in multiple ways (e.g. it can be split at various places).With the new
--topdir
argument, users can now directly control where the west workspace is created.Parameterized tests for
west init --topdir
are added as well.Moreover, the help texts and descriptions are (hopefully) simplified.