-
Notifications
You must be signed in to change notification settings - Fork 126
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
west init should recursively handle submodules for the manifest repo #498
Comments
I'm not sure I understand, are you referring to submodules of the manifest repo specifically as opposed to submodules of projects listed in the manifest? I understand that idea but it would break one of |
... except during west init when we fetch it for the first time. So this request seems reasonable. |
So it would affect Seems fine as long as it's possible and easy to manually |
Correct.
This remains possible to do with |
I spent some time today trying to implement this within the constraints of how Basically, I think we should handle this issue (i.e. issue #498) by:
Then you'd be able to write something like this:
This way, west gets out of your way and lets you decide how you want to set things up. @johnkjellberg will that work for you? @marc-hb any thoughts? I know you're about to ask me "why does |
So you read me like a book during a pandemic.... I thought about: what if we were in the same office space and I got scared. Thanks for the link, very relevant.
tl;dr: nice, LGTM. Because west is a git wrapper for a very large part, there will always be a constant stream of requests for west to support more and more git features[*]. This happens with every wrapper and is especially common in the poster child for "too many layers of indirections": build systems. What I found works and scales well in this adjacent build system area is exactly this "passthrough" approach. What I found does not work and does not scale is trying to mimic/replicate each git option into a new west option (and now I'm trying not to think about J2EE frameworks). One of the top issues with this "passthrough" approach is quoting whitespace on the command line. One layer of quoting is easy, two is hards and three and above are basically impossible. The When that makes sense (not always), it's also good to preserve git defaults according to the https://en.wikipedia.org/wiki/Principle_of_least_astonishment
Funny how
Do you mean cc: @Damian-Nordic [*] and issues with west vs git "impedance mismatches" like this very similar one: #496 (comment). BTW when is mercurial support planned? (just kidding) |
I think this is a matter of philosophy for the tool. For me, I imagined I am a new user to |
I think it's unfortunately difficult for a git wrapper not to assume any git knowledge and to "correct" some git decisions and defaults (e.g., recursive by default) because by doing so it breaks the https://en.wikipedia.org/wiki/Principle_of_least_astonishment for other users who do know git and got familiar with its defaults. The idea that a
Besides surprising people familiar with git I can think of another one: this makes changing the value more complex for west. Now west has to scan the value of |
@mbolivar-nordic how hard would it be to support Slightly off-topic: is there a way for |
Yes, if we really really have to because somebody complains loudly enough. But again I lean towards "this use case is not important enough to implement" for 'weird' refs like Bending over backwards to suit the way GitHub does things in edge cases like this feels a bit wrong. |
Config options are easy. I am skeptical of adding this to the manifest without a well thought out use case.
TL;DR no. Slightly longer answer, we discussed this during west's early days, but the only use case we came up with was to set |
I didn't mean that the person doesn't know about I might not understand the purpose of
If |
Personal experience, mostly I use current workspace when reviewing, but it does happen once in a while that I decide to create a new workspace for testing complex PRs and want to keep it away from my usual work, however I think that to majority of users the recursive
I see no problem in doing this.
Should we generalize this command: And of course allow |
The problem with adding a specific flag or non-default git behavior to
The "as possible" part is the important one here. Maybe There just isn't a one size fits all solution here, so I don't want to try to provide one. Especially given that there's no stability in the underlying tool itself: maybe git version 2.75 in the future will provide some wholly new default behavior for |
How would you know if all submodules are indeed required. As example: connectedhomeip comes with a large list of submodules where you might only want a few of those. So I think this is better to keep this as opt-in. |
I think not because west calls git a surprisingly large number of times, so it would be ambiguous "which" git this refers to. |
Well, if for the
|
It's the exact same problem with plain git, west only inherited it. There is no end of git usability issues that west could go and try to fix. https://stevebennett.me/2012/02/24/10-things-i-hate-about-git/ From https://ideas.ted.com/the-wisdom-of-linus-torvalds/
|
Just found this : https://stackoverflow.com/a/53622660
|
I think Similarly, the brand new Also quoting https://docs.zephyrproject.org/latest/guides/west/config.html#west-config-index
#496 may provide some example(s) |
Yes. I agree with the problem is in plain git. I guess this is mostly about expectations about I think I have a much better insight into |
That's a very fair point and in fact in 4th comment above I wrote:
However this all has to be balanced against implementation complexity, other preferences and priorities, "future-proofness" and last but not least limited manpower to deal with it all. For now it seems the person writing 98% of the west code makes the technical decisions (after attentive consultation) and for the coherence and success of the project I hope it stays that way :-) |
Even simple commands like
I think it is better to avoid overgeneralizing right now and stick to specific options like |
Yes, but I was referring to those commands where a user might have an interest in passing additional git options, that is I didn't say all those were the commands I listed above:
and I see those commands as wrapping |
My point is that I don't like the name For |
This was done a long time ago in commit e283d99 (July 2021)
This was merged today in #744, thank you @usmanimtiaz63 I just tested |
This was done recently, commit 73aee32 from @pdgendt
|
To make the workflow
west init ...
west update
fully working for manifest repositories with submodules,west init
command should recursively get git submodules.The text was updated successfully, but these errors were encountered: