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

locator: Remove unused lshift-operator for topology #18714

Closed

Conversation

xemul
Copy link
Contributor

@xemul xemul commented May 16, 2024

No description provided.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
@xemul xemul added the backport/none Backport is not required label May 16, 2024
Copy link
Contributor

@tchaikov tchaikov left a comment

Choose a reason for hiding this comment

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

lgtm

@nyh
Copy link
Contributor

nyh commented May 16, 2024

Again, I'm curious about the motivation - is it because we have a better fmt version so we don't need this one?

Or we don't have anything better but it's simply unused so you want to delete it?

I think it makes sense to have output functions for most if not all types, even if you're not using them in any existing code. I don't think unused printing functions are bad. Leaving unused printing functions means that if one day in the future I want to debug something, I can print out random objects the code is holding, and hopefully the code will have an operator<< and/or fmt implemented for it and it will work.

@xemul
Copy link
Contributor Author

xemul commented May 16, 2024

Again, I'm curious about the motivation - is it because we have a better fmt version so we don't need this one?
Or we don't have anything better but it's simply unused so you want to delete it?

The latter, no code prints topology currently.

I think it makes sense to have output functions for most if not all types, even if you're not using them in any existing code. I don't think unused printing functions are bad. Leaving unused printing functions means that if one day in the future I want to debug something, I can print out random objects the code is holding, and hopefully the code will have an operator<< and/or fmt implemented for it and it will work.

AFAIU logging an object with defined operator<< won't work on modern fmtlib as the "fallback formatter" is deprecated since recently. For types that are printed we have formatters, that work with fmt and logging and we keep operator<<'s for types that are still printed using legacy ostream.

@scylladb-promoter
Copy link
Contributor

🟢 CI State: SUCCESS

✅ - Build
✅ - Container Test
✅ - Unit Tests
✅ - dtest with topology changes
✅ - dtest

Build Details:

  • Duration: 3 hr 56 min
  • Builder: spider7.cloudius-systems.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants