#767 Consider using enums or union to pass merge flags
Closed: Invalid None Opened 8 years ago by dpal.

Merge flags are a combination of 3 mutually exclusive sets.
There is no good enforcement of that.

One of the suggested alternatives is

struct ini_struct {
    enum ms_cmd ms;
    enum mv1s_cmd mv1s;
    enum mv2s_cmd mv2s;
}

Though this approach seems a bit too heavy it makes sense to give it a bit more thought.


Fields changed

rhbz: => 0

Fields changed

rhbz: => 0

Fields changed

rhbz: => 0

Fields changed

blockedby: =>
blocking: =>
feature_milestone: =>
milestone: Tools Backlog => Tools 1.0
patch: => 0

Fields changed

blockedby: =>
blocking: =>
feature_milestone: =>
milestone: Tools Backlog => Tools 1.0
patch: => 0

Fields changed

blockedby: =>
blocking: =>
feature_milestone: =>
milestone: Tools Backlog => Tools 1.0
patch: => 0

I gave it a bit more thought. The benefit of not using the struct is that new flags can be added later without breaking the ABI. If we use a struct and need to add a new flag we would have to change the structure and that would require an interface change.
As ugly as it is I do not see a good reason to change the flags to a struct.

design: =>
design_review: => 0
fedora_test_page: =>
resolution: => wontfix
selected: =>
status: new => closed

I gave it a bit more thought. The benefit of not using the struct is that new flags can be added later without breaking the ABI. If we use a struct and need to add a new flag we would have to change the structure and that would require an interface change.
As ugly as it is I do not see a good reason to change the flags to a struct.

design: =>
design_review: => 0
fedora_test_page: =>
resolution: => wontfix
selected: =>
status: new => closed

I gave it a bit more thought. The benefit of not using the struct is that new flags can be added later without breaking the ABI. If we use a struct and need to add a new flag we would have to change the structure and that would require an interface change.
As ugly as it is I do not see a good reason to change the flags to a struct.

design: =>
design_review: => 0
fedora_test_page: =>
resolution: => wontfix
selected: =>
status: new => closed

Metadata Update from @dpal:
- Issue set to the milestone: Tools 1.0

2 years ago

Login to comment on this ticket.

Metadata