-
Notifications
You must be signed in to change notification settings - Fork 125
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: project: Allow updating only cloned projects #781
Conversation
Add an update command argument and configuration option to allow updating the currently cloned projects. This can help in the scenario where a user updated an initial set of projects manually and would like to only update those in the future. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
49d4ccc
to
d0231ab
Compare
Add a test case for passing --cloned to west update or as a configuration option. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
d007966
to
b506184
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.
The biggest source of doubt I have about this comes from how it should work when you have a project that is:
- not cloned
- contains an
import:
in the manifest
The behavior here can be pretty counter-intuitive and confusing -- did you consider this in detail? What's the plan here?
For a real world example, consider this top level west.yml fragment:
manifest:
projects:
- name: p1
import: true
- name: p2
import: true
then p1/west.yml
says:
manifest:
projects:
- name: foo
url: url1
while p2/west.yml
says:
manifest:
projects:
- name: foo
url: url2
If you do west update --cloned
with p1
and p2
both cloned, you get foo
from url1
. But if you do west update --cloned
with just p2
cloned, you get foo
from url2
.
I find this sort of behavior pretty confusing and I'm not sure what the "right" thing is in terms of what the user would reasonably expect:
- should we just fail if any project with an
import
is not cloned? - should we ignore it and therefore allow us to get imported projects from surprising places (
url2
instead ofurl1
)? - something else?
help='''update the projects that are already cloned | ||
in the current workspace''') |
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.
Since update_some()
is being changed to match, I think the meaning of this option is closer to "only update a project if it's already cloned locally" or so, right?
I'm thinking about the behavior of west update --cloned foo
for an uncloned project foo
and feeling the current help doesn't make clear how it should work in this case.
I see, but how is this different from calling An "end-goal" I envisioned is to have a West extension in Zephyr, for example
I tried to keep it as simple as possible, but if it would cause more confusion than it could be useful, I'm happy to drop it. |
Hmn, it does differ as only
Maybe this would be more suited for the
I'll close this for now :) thanks @mbolivar for your time and sorry for the noise. |
Just for the record, this looked like an attempt to implement:
Sounds like we just got yet another PR/issue with the infamous label
Partial imports
|
Add an update command argument and configuration option to allow updating the currently cloned projects.
This can help in the scenario where a user updated an initial set of projects manually and would like to only update those in the future.