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

bugfix: Add checks if span exists #4901

Merged
merged 1 commit into from
Jan 26, 2023
Merged

Conversation

tgodzik
Copy link
Contributor

@tgodzik tgodzik commented Jan 25, 2023

For #4837

There are some other places that access span, but most of them seem safe.

For scalameta#4837

There are some other places that access span, but most of them seem safe.
Copy link
Member

@ckipp01 ckipp01 left a comment

Choose a reason for hiding this comment

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

👍🏼 LGTM

Copy link
Member

@kpodsiad kpodsiad left a comment

Choose a reason for hiding this comment

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

it's a bummer that some methods are unsafe and this is a bit hidden. Maybe it's worth to introduce some wrapper over Span? Either way, one would have to remember to not use span directly or without guard check..

@tgodzik
Copy link
Contributor Author

tgodzik commented Jan 26, 2023

it's a bummer that some methods are unsafe and this is a bit hidden. Maybe it's worth to introduce some wrapper over Span? Either way, one would have to remember to not use span directly or without guard check..

Yeah, it's super weird, this should be made visible by using subtype SomeSpan and NoSpan or something like this

@tgodzik tgodzik merged commit 31cb56a into scalameta:main Jan 26, 2023
@tgodzik tgodzik deleted the check-span branch January 26, 2023 09:39
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.

4 participants