-
Notifications
You must be signed in to change notification settings - Fork 123
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
Test fixed group filter semantics #481
Test fixed group filter semantics #481
Conversation
It's annoying to have to specify projects lists in some cases when all you're trying to do is exercise something else. Though the number of situations where a manifest with no projects is useful may be limited, they nonetheless exist, so make it possible. This is a backwards incompatible change, so bump the schema version. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
See the big comment block for details. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
187085f
to
422b6cf
Compare
I'm sending this as test cases first so that we can agree on what we want to see before I implement it. |
Some thoughts after a Slack discussion with Marti:
# my/west.yml
group-filter: [+upstream.disabled-group]
manifest:
projects:
- name: upstream
import: true or # my/west.yml
manifest:
projects:
- name: upstream
import: true
group-filter: [+disabled-group] or both.
# my/west.yml
manifest:
projects:
- name: upstream
import: true
group-filter: false The last one would basically allow anyone to keep the simpler (IMHO) 0.9.0 behaviour. Best of luck! |
I disagree here. This problem is, in my opinion, as "natural" as they come, as it appeared in a real-life scenario of west usage. That way all users do the same when initializing the SDK:
and most will then simply do:
without even having to worry about the presence of additional non-public repos in that manifest.
In the same way, all SDK users import the main (and only) manifest entry point in their manifests for their own SDK-based applications, again without having to worry about the presence of non-public repos. Those who do care about them then do not need to do anything extra in their manifest, instead just using the same |
I have very little experience with this but I don't see why this must be error-prone and more complicated. Typical software development involves a top-level executable that "imports"/ links to a tree of libraries/dependencies and the decisions about what gets included are generally centralized at the top-level. More importantly they don't involve (double) negations. There's rarely a need to combine operators up and down the tree to figure out the final result. Off-topic sorry. |
Having a single entry point means that the user never has to deal with the actual name of the manifest file during
And then configure the group filter correctly based on their needs/access to non-public features.
but they also need to deal with group filters because they might not have access to all the repos listed in |
Right, a combination of the two schemes is always going to be more complicated than a single one of them :-) I didn't foresee any |
Hi @marc-hb and thanks for the very thoughtful feedback. Here are my responses.
Noted -- however, that is indeed what they are meant for, so we need to proceed on that basis.
That's reasonable, and I've struck the word inherit from the pull request description.
Yes, as discussed on Slack, I absolutely agree this must be consistent with the way that manifest import order already works. I will send a draft PR to the documentation so we can see the new semantics in black and white.
Yep, that is what I'm trying to do here. I will add some more test cases for the use cases which I am aware of. However, we have to be practical about how much we can expect. To a first approximation, nobody reviews, they just use things when they come out and complain if they don't get what they want. That's totally fine and in fact is what happened here. We are adjusting based on that feedback.
Yes, the PR which implements the changes will contain additional debug logging related to this change.
I don't think that's a good idea. The source of group's definition is not important, any more than the source of a project definition is important. We don't prefix a project's name with an identifier for the manifest that defined it for good reasons which also apply here. Concretely, if I have this project in zephyr/west.yml: name: foo
groups:
- bar I can run Now if I get that very same project via Why? For one thing, it breaks use cases where people change their manifest repository via That makes no sense and would make me quite frustrated as a user.
On Slack, I offered to add this and you said no. If you're changing your mind now and you would like to request it, I will make sure to implement it. Please confirm if that's the case. |
# | ||
# For compatibility, manifests which explicitly request a 0.9 schema | ||
# version will get the old behavior. However, we'll also release a | ||
# west 0.9.1 which will warn about a missing schema-version in the top |
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.
Based on this observation: zephyrproject-rtos/zephyr#32106 (comment)
i'm not sure we can actually cut a 0.9.1
now.
Actually, this is a very interesting thought imo. Example:
So a user switching between up- and downstream could actually benefit from not having to reconfigure groups when switching. But I think the current proposal is simpler to describe and understand, and thus less risk of confusing users. |
what will happen in this case:
and:
where upstream specifies |
Thinking a bit more on this:
Instead of doing what is described above, then what if we deprecate the key That way, |
That feels more complicated to me because now there is the possibility of using different keys at different import levels = a combinatorial explosion impossible to test practically. What about simply changing the behavior unconditionally? Not looking at the manifest version except for printing a warning? In other words, treat this as a bug fix considering this was always the behavior intended in the first place? Note this is from the person who find this "opt-in" feature... weird? Yet I value the simplicity of just one weird behavior more than some complex matrix of possibilities. Yes this would break "backwards compatibility" but backwards compatibility seems overrated here, the perfect is the enemy of the good. To be affected you would have to be:
Isn't that a small set of use cases already? At this point there are two subsets of users left: those who use the opt-in group and those who don't. For non-users, this change will be a pure and sometimes eagerly expected bug fix. So only actual users will have the minor inconvenience of having to actually opt-in. Once they have, any west version will work for them. |
I like that approach, let's see if others agree. |
Superseded by #482 |
I didn't end up going this way. The |
Linking to new "import filter" feature #543 |
Superseded by #482