Remove the __private_api_log_lit special case #446

Merged
ghost merged 1 commit from format-args-capture into master 2021-01-24 08:31:06 -06:00
ghost commented 2021-01-23 10:56:13 -06:00 (Migrated from github.com)

https://github.com/rust-lang/log/issues/445#issuecomment-765965279:

That special case existed to minimize the amount of code generated, but it's not compatible with format_args_capture as you pointed out. It should just be removed.

Closes #445.

I did not add a test for format_args_capture. I think I need to create a custom logger to capture records and add a testing-only crate feature or --cfg (to tell if #![feature(format_args_capture)] is allowed to use) to test it. format_args_capture is unstable now, I'm not sure if it worths it. Feel free to ask me to add such test if it's necessary.

https://github.com/rust-lang/log/issues/445#issuecomment-765965279: > That special case existed to minimize the amount of code generated, but it's not compatible with format_args_capture as you pointed out. It should just be removed. Closes #445. I did not add a test for `format_args_capture`. I think I need to create a custom logger to capture records and add a testing-only crate feature or `--cfg` (to tell if `#![feature(format_args_capture)]` is allowed to use) to test it. `format_args_capture` is *unstable* now, I'm not sure if it worths it. Feel free to ask me to add such test if it's necessary.
ghost commented 2021-01-23 11:06:51 -06:00 (Migrated from github.com)

The CI failure looks like rust-lang/cargo#8517.

    Updating crates.io index
warning: spurious network error (2 tries remaining): error inflating zlib stream; class=Zlib (5)
warning: spurious network error (1 tries remaining): error inflating zlib stream; class=Zlib (5)
error: failed to get `cfg-if` as a dependency of package `log v0.4.13 (D:\a\log\log)`

Caused by:
  failed to load source for dependency `cfg-if`

Caused by:
  Unable to update registry `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to fetch `https://github.com/rust-lang/crates.io-index`

Caused by:
  error inflating zlib stream; class=Zlib (5)
Error: Process completed with exit code 1.
The [CI failure](https://github.com/rust-lang/log/runs/1754550362#step:4:5) looks like rust-lang/cargo#8517. <details> ``` Updating crates.io index warning: spurious network error (2 tries remaining): error inflating zlib stream; class=Zlib (5) warning: spurious network error (1 tries remaining): error inflating zlib stream; class=Zlib (5) error: failed to get `cfg-if` as a dependency of package `log v0.4.13 (D:\a\log\log)` Caused by: failed to load source for dependency `cfg-if` Caused by: Unable to update registry `https://github.com/rust-lang/crates.io-index` Caused by: failed to fetch `https://github.com/rust-lang/crates.io-index` Caused by: error inflating zlib stream; class=Zlib (5) Error: Process completed with exit code 1. ``` </details>
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-rust-lang/log!446
No description provided.