Public bug reported:

A failing rust-datatest-stable autopkgtest is blocking rust-defaults
migration to 1.93.

rust-datatest-stable autopkgtests don't work with versions of Rust newer
than 1.92 because in 1.93 upstream Rust changed the following line in
compiler/rustc_errors/src/emitter.rs:

 -  for text in normalize_whitespace(&text).lines() {
 +  for text in normalize_whitespace(&text).split('\n') {

This change causes messages to yield an empty item for a trailing \n,
meaning that rust-datatest-stable's autopkgtests, which expect exact
matches, fail due to an extra empty newline in the message:

215s test tests/compile-fail/old-format.rs ... 
mismatch
215s 
215s EXPECTED:
215s ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
215s error: this format is no longer supported -- please switch to 
specifying as:
215s 
215s        datatest_stable::harness! {
215s            { test = foo, root = "path1", pattern = r"^.*/*$" },
215s            { test = bar::baz, root = "path2", pattern = r"^.*/*$" 
},
215s        }
215s 
215s        note: patterns are now evaluated relative to the provided 
root, not to the crate root
215s  --> tests/compile-fail/old-format.rs:1:1
215s   |
215s 1 | datatest_stable::harness!(foo, "path1", r"^.*/*$", bar::baz, 
"path2", r"^.*/*$");
215s   | 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
215s   |
215s   = note: this error originates in the macro 
`datatest_stable::harness` (in Nightly builds, run with -Z macro-backtrace for 
more info)
215s ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
215s 
215s ACTUAL OUTPUT:
215s ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
215s error: this format is no longer supported -- please switch to 
specifying as:
215s 
215s        datatest_stable::harness! {
215s            { test = foo, root = "path1", pattern = r"^.*/*$" },
215s            { test = bar::baz, root = "path2", pattern = r"^.*/*$" 
},
215s        }
215s 
215s        note: patterns are now evaluated relative to the provided 
root, not to the crate root
215s 
215s  --> tests/compile-fail/old-format.rs:1:1
215s   |
215s 1 | datatest_stable::harness!(foo, "path1", r"^.*/*$", bar::baz, 
"path2", r"^.*/*$");
215s   | 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

** Affects: rust-datatest-stable (Ubuntu)
     Importance: Undecided
     Assignee: Max Gilmour (maxgmr)
         Status: In Progress


** Tags: update-excuse

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2146373

Title:
  autopkgtests don't work with Rust 1.93+

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rust-datatest-stable/+bug/2146373/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to