Skip to content
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

Consider using enums or union to pass merge flags #1809

Closed
sssd-bot opened this issue May 2, 2020 · 0 comments
Closed

Consider using enums or union to pass merge flags #1809

sssd-bot opened this issue May 2, 2020 · 0 comments

Comments

@sssd-bot
Copy link

sssd-bot commented May 2, 2020

Cloned from Pagure issue: https://pagure.io/SSSD/sssd/issue/767

  • Created at 2011-01-05 22:00:07 by dpal
  • Closed as Invalid
  • Assigned to nobody

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.

Comments


Comment from dpal at 2012-01-19 03:26:54

Fields changed

rhbz: => 0


Comment from dpal at 2012-01-19 03:26:54

Fields changed

rhbz: => 0


Comment from dpal at 2012-01-19 03:26:54

Fields changed

rhbz: => 0


Comment from dpal at 2012-09-26 21:59:17

Fields changed

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


Comment from dpal at 2012-09-26 21:59:17

Fields changed

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


Comment from dpal at 2012-09-26 21:59:17

Fields changed

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


Comment from dpal at 2012-12-23 16:26:22

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


Comment from dpal at 2012-12-23 16:26:22

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


Comment from dpal at 2012-12-23 16:26:22

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


Comment from dpal at 2017-02-24 14:32:37

Metadata Update from @dpal:

  • Issue set to the milestone: Tools 1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant