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

fix(api): fix accidental exhaustive matching on metadata::Kind #271

Merged
merged 1 commit into from
Feb 4, 2022

Conversation

hawkw
Copy link
Member

@hawkw hawkw commented Feb 4, 2022

The tracing_core::metadata::Kind type was not intended to be matched
exhaustively, so that its internal representation could be changed
without causing a breaking change. However, some fairly recent compiler
changes broke this, and made the type exhaustively matched. This
resulted in tracing-core 0.1.22 breaking console-api.

This PR fixes the breakage by changing console-api to avoid
exhaustively matching on Kinds.

Fixes #270

The `tracing_core::metadata::Kind` type was not intended to be matched
exhaustively, so that its internal representation could be changed
without causing a breaking change. However, some fairly recent compiler
changes broke this, and made the type exhaustively matched. This
resulted in `tracing-core` 0.1.22 breaking `console-api`.

This PR fixes the breakage by changing `console-api` to avoid
exhaustively matching on `Kind`s.

Fixes #270
@hawkw
Copy link
Member Author

hawkw commented Feb 4, 2022

Once this is published, I think we may need to yank all previous versions of console-api, so that cargo-install always uses the latest version? Or, we can bump tokio-console's dependency and publish a new version of it as well.

@guswynn
Copy link
Contributor

guswynn commented Feb 4, 2022

This looks good to me, but is there any reason not to just delete the whole From impl? it appears to be unused? Is it just because it now technically a public api?

edit: answered in the other issue

@hawkw
Copy link
Member Author

hawkw commented Feb 4, 2022

This looks good to me, but is there any reason not to just delete the whole From impl? it appears to be unused? Is it just because it now technically a public api?

edit: answered in the other issue

yeah, deleting the From impl would require releasing console-api 0.2, which i don't super want to do...

@hawkw hawkw merged commit d9aafaa into main Feb 4, 2022
@hawkw hawkw deleted the eliza/fix-exhaustive-matching branch February 4, 2022 18:55
hawkw added a commit that referenced this pull request Feb 4, 2022
<a name="0.1.2"></a>
## 0.1.2 (2022-02-04)

#### Bug Fixes

* fix accidental exhaustive matching on `metadata::Kind` (#271)
  ([d9aafaa](d9aafaa), closes [#270](270))
hawkw added a commit that referenced this pull request Feb 4, 2022
<a name="0.1.2"></a>
## 0.1.2 (2022-02-04)

#### Bug Fixes

* fix accidental exhaustive matching on `metadata::Kind` (#271)
  ([d9aafaa](d9aafaa), closes [#270](270))
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.

Broken compile with tracing-core 0.1.22
3 participants