-
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
west compare (and others) don't sync manifest-rev with west.yml: need "west fetch" #747
Comments
Are you running
It may seem surprising but most west commands don't look at the manifest. Instead, they look at the
Also: could you please provide a short, step-by-step script that reproduces the issue? Just to make sure we're all on the same page. |
Not necessarily. And this was the problem we were trying to mitigate. If one developer merges a change to the manifest, another developer might pull that and build without realizing they needed to run We don't want to automatically run
Exactly. We were surprised by that behavior (though I admit that the behavior is consistent with the explanation in For us though, it was more useful to compare to against the manifest to catch those changes pulled in remotely. Maybe an option for
|
Is
|
Eventually, everyone will want the same option to be duplicated in every command. We need something more generic.
From #338 (comment)
Back to you:
I've seen this requested a few times, it's a common issue. For now, developers must learn that all changes to the manifest repo may require a
What you are really asking is "why does the Also, please ask about this and other, related questions above in the |
This label is another good starting point:
Partial imports
|
OK, that didn't take long: I just searched the project for The long story short is: So, you must really consider Now going back to your original question, I think |
Thanks for looking into this! @pdgendt
I guess our current extension works for us (for now) because we're only using simple cases where the resolution of the manifest is trivial. |
Fixes new `west diff --manifest` option added by commit 0d5ee4e ("app: project: Allow to diff against manifest revision") Do not pass `project.revision` to `git diff` because `project.revision` is unresolved user input and does not always resolve to a commit. For instance, `project.revision` can be the name of a remote branch like `v3.7-branch` that does not exist locally; then `git diff` fails. Or even worse: there could be a local branch of the same name which points to a totally different commit. This bug was found when discussing issue zephyrproject-rtos#747, see 7th comment there for a longer description of what `manifest-rev` is and how it works. Signed-off-by: Marc Herbert <[email protected]>
So Fix submitted (and inconsistency removed) in #748, please review. Please don't shoot the messenger! [*] the manifest cannot point to local branches. |
Fixes new `west diff --manifest` option added by commit 0d5ee4e ("app: project: Allow to diff against manifest revision") Do not pass `project.revision` to `git diff` because `project.revision` is unresolved user input and does not always resolve to a commit. For instance, `project.revision` can be the name of a remote branch like `v3.7-branch` that does not exist locally; then `git diff` fails. Or even worse: there could be a local branch of the same name which points to a totally different commit. This bug was found when discussing issue #747, see 7th comment there for a longer description of what `manifest-rev` is and how it works. Signed-off-by: Marc Herbert <[email protected]>
Fixes new `west diff --manifest` option added by commit 0d5ee4e ("app: project: Allow to diff against manifest revision") Do not pass `project.revision` to `git diff` because `project.revision` is unresolved user input and does not always resolve to a commit. For instance, `project.revision` can be the name of a remote branch like `v3.7-branch` that does not exist locally; then `git diff` fails. Or even worse: there could be a local branch of the same name which points to a totally different commit. This bug was found when discussing issue zephyrproject-rtos#747, see 7th comment there for a longer description of what `manifest-rev` is and how it works. Signed-off-by: Marc Herbert <[email protected]>
Fixes new `west diff --manifest` option added by commit 0d5ee4e ("app: project: Allow to diff against manifest revision") Do not pass `project.revision` to `git diff` because `project.revision` is unresolved user input and does not always resolve to a commit. For instance, `project.revision` can be the name of a remote branch like `v3.7-branch` that does not exist locally; then `git diff` fails. Or even worse: there could be a local branch of the same name which points to a totally different commit. This bug was found when discussing issue #747, see 7th comment there for a longer description of what `manifest-rev` is and how it works. Signed-off-by: Marc Herbert <[email protected]>
Initial title: "west compare doesn't detect updated project revisions in manifest"
When running
west compare
, I expected that if my repo state didn't match the manifest, it would report it.Actual behaviour: changes to repo are detected. But changes to manifest (e.g. change sha in a project's
revision
property) are not detected.Is this the intended behaviour?
In our project, we want to confirm before building that repo state matches the manifest. We do this by running
west compare
before a build. But this doesn't catch an updated manifest. We have currently worked around this with a west extension which useswest compare
and also checks each project repo in the workspace against the revision in the manifest.Would an update to
west compare
to include this check be useful to others?cc:
git rebase --onto
instead #448The text was updated successfully, but these errors were encountered: