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

pkg/private/common: move IfIDType out of private/common and to its own package #4604

Merged
merged 8 commits into from
Sep 19, 2024

Conversation

jiceatscion
Copy link
Contributor

@jiceatscion jiceatscion commented Aug 30, 2024

Given that IfIDType represents generic interface IDs as used in segments distributed by the control service, it seems that it shouldn't be private either, even if it currently can be. So the new package isn't private.

Fixes #4584

Given that IfIDType represents generic interface IDs as used in segements
distributed by the control service, it seems that it shouln't be private
either, even if it currently can be. So the new package isn't private.
@jiceatscion
Copy link
Contributor Author

This change is Reviewable

jiceatscion and others added 3 commits August 30, 2024 15:47
There was no way to convince forbidigo that our strict naming rules
for interface id (which explcitly forbid lower case "ifid") that it was ok
for a package name.
Copy link
Contributor

@oncilla oncilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 78 files reviewed, 1 unresolved discussion (waiting on @jiceatscion and @lukedirtwalker)


pkg/segment/iface/iface.go line 26 at r2 (raw file):

// 64 bits. There is a lot of path-type-independent code that manipulates interface IDs without
// interpreting them. This type is a container for them.
type IfIDType uint64

At the usage site, this now is iface.IfIDType
It stutters, is barely readable, and full of redundancy.

How about we just name it ID? At usage site, this turns into iface.ID which is much easier on the eyes, and contains just as much information.

Suggestion:

type ID uint64

Copy link
Contributor Author

@jiceatscion jiceatscion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 78 files reviewed, 1 unresolved discussion (waiting on @lukedirtwalker and @oncilla)


pkg/segment/iface/iface.go line 26 at r2 (raw file):

Previously, oncilla (Dominik Roos) wrote…

At the usage site, this now is iface.IfIDType
It stutters, is barely readable, and full of redundancy.

How about we just name it ID? At usage site, this turns into iface.ID which is much easier on the eyes, and contains just as much information.

I agree this is much better. Done

Copy link
Contributor

@oncilla oncilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 78 files at r1, 29 of 76 files at r2, 47 of 47 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @lukedirtwalker)

Copy link
Contributor

@oncilla oncilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @lukedirtwalker)

@jiceatscion jiceatscion enabled auto-merge (squash) September 19, 2024 09:35
@jiceatscion jiceatscion enabled auto-merge (squash) September 19, 2024 09:36
@jiceatscion jiceatscion removed the request for review from lukedirtwalker September 19, 2024 09:50
Copy link
Contributor Author

@jiceatscion jiceatscion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dismissed @oncilla from a discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @jiceatscion)

@jiceatscion jiceatscion merged commit 59c70dc into scionproto:master Sep 19, 2024
5 checks passed
@jiceatscion jiceatscion deleted the ifidtype branch September 19, 2024 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pkg/private/common: delete the deprecated IfIDType definition
2 participants