-
Notifications
You must be signed in to change notification settings - Fork 45
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
Behavior of targets and groups #1114
Comments
Sorry I was up very late last night due to preparation of a collaborator on-site visit today. I'm a bit lost now because
I thought |
I knew it can be confusing.
set variable to targets, not groups because there is no difference between
and
because both are just Now we have
that assigns variables to each target (which then affects all targets in groups, thus in
that assigns variables to each group so it affects only |
I see, that explains a lot for me. Basically Still thinking ... |
|
Yes I think I understand that.
Maybe concrete example helps.
gives
gives
gives
gives
? |
The behavior of
|
Okay so why not still call |
Also when you say "correct" in your latest thread you mean my understanding was "correct"? |
Yes, but your code example was wrong (not real code) since |
yields
because |
New output
|
Great! But this way I do not see the value of Also again, why not using |
So previous with
we can use them as
and now with
we can use them as
As for naming, since we have As for carrying information, nothing prevents you from doing
Then the
|
Now, it is possible for us to keep
where the default |
Hmm then I can try to use it from the next step via some smart usage of
Yes I think
Sorry it is more confusing than useful in my view. |
Not so if we promote
|
Okay but what if I want to undo the grouping? ie merge all groups. Or to re-group? |
|
hmm, maybe |
Something like that. The default can be If we are to do this, then the difference between
is the same as
We have less a need to regroup so
should use the original grouping, and then
can regroup. Then we can have multiple
|
Sounds like a good idea! Also conceptually more consistent with the implementation. Do you see any limitations given all we have been discussing? Obviously it involves lots of typing, unless we change |
We discourage the use of Even with the new stuff,
because in most cases
would be fine and is backward compatible. |
I think it makes sense that |
Things can be tricky for
We know how to handle
but in the case of
the whole thing should be
and I suppose |
I think for that corner case it is fair enough to throw an error for grouping ambiguity. And just to double-check,
or, in general, multiple |
Another point is that,
is a lot easier than
Even
is easier to type than to keep the group. So, do we really need this? |
So Keeping group is conceptually useful for complex cases like the |
The only incompatible case that changing default to
because
would be unaffected since it will be considered to be regrouping. |
Right now we support |
Cannot argue against it now ...
Very much agreed.
i would personally not worry about compatibility for this change because I know I have only a few pipelines that will be impacted but not more than a few and I think I remember exactly what they are. I'm just still trying to think about possible bad effects we are not seeing now. |
In any case I am happy to get rid of |
I think our discussion is converging. Would you mind updating #1115 when you get a chance? |
#1115 updated. You can check if everything look ok, except perhaps about the naming of things. |
We have
to set variables to each target of the
sos_targets
, buteach
is not quite clear as whatdoes because on the surface
sos_groups()
returns groups.It would be better to do
and add
to make it clear what the variables are set to. In the latter case,
set_to_groups
can be an alternative method forgroup_with
(#1113).The text was updated successfully, but these errors were encountered: