Potential behaviour regression with named formatting arguments #372

Closed
opened 2019-12-16 05:37:39 -06:00 by kubkon · 7 comments
kubkon commented 2019-12-16 05:37:39 -06:00 (Migrated from github.com)

Current release version 0.4.10 seems to have introduced a regression in behaviour in the sense that named formatting arguments, which were legal in the previous versions, are now illegal.

Minimal example:

fn main() {
    let name = "John";
    log::info!("Hello, {name}", name = name);
}

Is this intended behaviour or a bug?

Current release version `0.4.10` seems to have introduced a regression in behaviour in the sense that named formatting arguments, which were legal in the previous versions, are now illegal. Minimal example: ```rust fn main() { let name = "John"; log::info!("Hello, {name}", name = name); } ``` Is this intended behaviour or a bug?
kubkon commented 2019-12-16 05:37:59 -06:00 (Migrated from github.com)

NB, works with the previous release 0.4.8.

NB, works with the previous release `0.4.8`.
bbqsrc commented 2019-12-16 15:23:11 -06:00 (Migrated from github.com)

This is quite broken. 0.4.8 works, newer version broken. Format args do not work and cause build errors.

This is quite broken. 0.4.8 works, newer version broken. Format args do not work and cause build errors.
estk commented 2019-12-16 17:24:06 -06:00 (Migrated from github.com)

@KodrAus or @sfackler Maybe .10 should be yanked? I have the same issue.

@KodrAus or @sfackler Maybe .10 should be yanked? I have the same issue.
maplant commented 2019-12-16 17:29:12 -06:00 (Migrated from github.com)

@estk agree that 0.4.10 should be yanked.

@estk agree that 0.4.10 should be yanked.
sfackler commented 2019-12-16 17:29:23 -06:00 (Migrated from github.com)

Yanked.

Yanked.
KodrAus commented 2019-12-16 21:28:25 -06:00 (Migrated from github.com)

Ok. It looks like we just haven’t built up the CI coverage yet to be able to make changes to the log macros without breaking things. I’ll add some more cases, revert our implementation back to what it was (but retain #366) and we can explore macro changes externally.

Ok. It looks like we just haven’t built up the CI coverage yet to be able to make changes to the `log` macros without breaking things. I’ll add some more cases, revert our implementation back to what it was (but retain #366) and we can explore macro changes externally.
KodrAus commented 2019-12-18 18:49:04 -06:00 (Migrated from github.com)

master has been updated to use the old macro implementation and we've got a failing test on the kv_macro branch the new one lives on to track this. Any new releases we push out now will be using the same macros as 0.4.8.

I'll go ahead and close this one now. Thanks for the report!

`master` has been updated to use the old macro implementation and we've got a failing test on the `kv_macro` branch the new one lives on to track this. Any new releases we push out now will be using the same macros as `0.4.8`. I'll go ahead and close this one now. Thanks for the report!
Sign in to join this conversation.
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#372
No description provided.