-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Add TagWith overload that gets the filename and line number automatically #14176
Comments
Are you referring to this tweet: https://twitter.com/Nick_Craver/status/1069999128082595847 ? And this gist https://gist.github.com/NickCraver/c6f371bf8df37e05c4f09fd3c02ef6a2 ? |
@jzabroski Yes. |
@ajcvickers: Is it something I can help with? Please confirm the approach:
What shall we call it? TagWithCallerInfo? |
@michalczerwinski Yes, that seems to be a reasonable approach. Naming is hard, but can this just be a new overload of TagWith rather getting a new name? |
@ajcvickers: great! Will keep it as overload then. |
Isn’t the usefulness of the caller attributes that they automatically set the optional parameters for you? As such, naming it |
@stevendarby: that's why I called it TagWithCallerInfo previously. But as @ajcvickers pointed out it's hard to call this method succinctly, so if you have better proposals? |
@michalczerwinski I haven’t got a better suggestion than your previous one, which I thought was ok. Sorry to weigh in at this point, I just wondered if perhaps @ajcvickers’ suggestion was made without full realisation of how it reads when using the defaults (which is the main use case for this method). If that’s understood and |
@michalczerwinski @stevendarby It doesn't really matter too much at this point since we have an API review process where we will look at all the names and possibly make changes then. Naming is hard; get the code changes done, and we can see what names works best later. |
Introduced overload for TagWith to pass caller info (file name and line number). Added test to cover the new functionality. Fixes #14176
As suggested/used by Nick Craver.
The text was updated successfully, but these errors were encountered: