`git_source` writes an IPv6 host in the compressed form Cargo writes,
so `https://[0:0:0:0:0:0:0:1]/r` pins as `https://[::1]/r`.
`check_commits` compares a source's repository with the rule's URL by
Cargo's repository identity: a trailing `/` and `.git` are removed, and
a `github.com` URL is compared over https with a lowercase path. A
dependency spelled `craft-libs.git` is now grouped with `craft-libs`,
and `craft-libs-extra` stays out of the group. A scheme containing `+`
keeps its `.git` suffix and path case.
- With `SameLayer::Allowed`, a testkit's dependency on a layered or
standalone crate at `testkit_layer` now passes and enters the cycle
check. `SameLayer::Ordered` still reports it as `Upward`.
- The `from_metadata` doc and the README now say that a `[patch]` that
redirects a registry dependency to a workspace member is not detected,
since `--no-deps` output does not resolve patches.
- Same-layer edges to a testkit now enter the cycle check, so two testkits
that use each other are reported. An edge that `format_allowed` rejects
is reported once and no longer enters the cycle check.
- `normalize_path` turns `\` into `/` only in a Windows path (a drive
letter, or two leading separators of either kind). On Unix a `\` stays
part of the name, so `/x/a\b` and `/x/a/b` no longer compare equal.
- The policy check rejects a `format_allowed` crate listed more than once.
- The piped-stderr test now writes a marker instead of a 4 MiB flood and
checks that it reaches the reader's stderr file, so the test fails
instead of hanging when `read_json` stops replacing a piped stderr.
The README and the `Policy::dev_exceptions` doc now say that a listed dev
pair passes only from a layered or testkit crate to a layered or standalone
crate. A standalone crate's dependencies still follow `standalone_deps`, and a
dependency on an exempt package is still reported as `OnExempt`. The README's
cycle sentence now covers only the same-layer dependencies that pass.
A new test checks that a listed dev pair on an exempt package still reports
`OnExempt`.
On macOS the temp directory is under /var, a link to /private/var, so current_dir() reads back the /private/var path and the assert failed on main's macOS gate.
- FetchError's Display escapes control characters in names, since a refused pin or an archive
entry can hold them.
- A name part longer than 255 bytes is refused.
- Names compare by the lowercase of the uppercase of their lowercase, so a capital sharp S, a
small sharp S and "ss" are one name.
- A file entry that names the archive's root (`.` or `./`) is refused instead of dropped; only a
folder entry may name it.
- The README says which names the path rules apply to.
- The system-tar test removes TAR_OPTIONS from tar's environment.
The manifest is edited at the source ranges of the version strings, so key order, comments and line endings outside them are unchanged. A path pin written as a multi-line string moves with the workspace version and keeps its delimiters. The online `cargo update` attempt starts from the Cargo.lock that existed before the offline attempt.
The link checks on dest and the folders under it run before each write rather than as part of it, so the README and the extract and fetch_pinned_with docs now say that every folder on the way to a written file must be writable only by the user running the fetch or the system.
- curl runs with --globoff, so brackets and braces in a pin's address are sent as they are.
- curl's exit status 63 (--max-filesize refused the body) becomes an error of kind FileTooLarge,
which the fetch reports as TooLarge, the same result as a body stopped while counting.
- curl's failure message no longer includes the address.
- fold puts a name in NFC before the case mapping as well as after it, so alpha followed by
U+0345 and U+0301 in either order gets one key.
- entry_parts checks the parts and measures the kept length before collecting anything.
- The tests use tempfile for their scratch folders, and the system tar test skips only when tar
is not installed.
A composed `é` and an `e` followed by a combining accent are one name on
macOS, so two pins or two archive entries spelled that way wrote the
same file. Names are now compared in Normalization Form C after the case
fold. The integration tests move to `tests/it/main.rs`.
The hand-written TOML scanner is removed. `read` and `replace` parse the
root manifest with toml_edit 0.25 and set the version strings in place,
keeping their quotes and the comments and spaces around them. The
manifest's line endings (LF or CRLF, per line) and a missing final line
ending are kept. A manifest that is not valid TOML, a duplicate key
included, is an error before anything is written.
Pending declarations are kept innermost last, so a closing delimiter or
an item's end now pops the ones above the current depth from the end
instead of scanning the whole list. A source with 200,000 pending `fn`s
and 200,000 `[]` groups took 216 s in a debug test before and reads at
once now.
The README and the `literals` docs now say that a comma in the type of
a parameter after its pattern, or of a cast, does not end test-only
code, and that a drive-relative input is resolved once before it is
listed.
Each input is now joined to the base, or a Windows drive-relative
input (`C:src`) to the current folder of its drive, before its folder
is listed. The listing and the reads use that path, and findings keep
the input's spelling, so a change of the drive's current folder during
the walk does not change which files are read.
A `=` among an enum's variants starts a discriminant that runs to the
next `,`, and its `( .. )` and `{ .. }` are an expression's, so a call
such as `V = f(..)` is no longer read as a tuple variant's fields. A
`(` after a path, a method or an operator is not a variant's either,
which covers a discriminant whose generic arguments hold a comma
(`V = m::f::<u8, u16>::call(..)`). Variants named by a macro's
`$name` or after repeated macro attributes keep their fields.
A `{` or `(` right after a macro's `!` in a struct, union or enum
header (`struct S where ty!{}: Copy { .. }`) is the macro's group, not
the declaration's fields. The declaration stays pending until its own
body brace, so the body still opens as typed fields.
An `as` in test-only code now starts a cast type that runs until a
token a type does not hold. A `<` after a word in that type opens
generic brackets, so a comma in `ptr as *const Pair<A, B>`, in a
qualified or generic path (`<T as Trait>::Assoc<A, B>`,
`Pair<u8>::Assoc<A, B>`) or in a function pointer's return type
(`f as fn() -> Pair<A, B>`) no longer ends the test-only code. A
comparison after the cast's parentheses (`(a as u8) < b`) or after an
operator (`a as u8 + a < b`) is still read as a comparison.
The pending declarations are now a stack, innermost last. A `fn`
pointer type or a local item inside a declaration's header
(`struct S<T = (fn(),)>`, `Box<[fn(u8, u16); 2]>`, a const generic
default block that declares a struct) is consumed by its own delimiter
and leaves the outer declaration pending, so the outer body still
opens as typed fields.
A `:` at the level of a test-only parameter now starts its type after
any pattern (`mut p`, `ref mut p`, `(a, b)`, `&(a, b)`, `P { x, .. }`,
`m::P(x)`), not only after a bare name, so a generic comma in that
type no longer ends the test-only code.
Cargo writes the port of an http or https git URL as a number, so
https://host:0443/r has the default port and its source is
https://host/r. git_source and check_commits kept :0443, so a valid pin
failed and check_commits could miss that repository's packages. A port
of digits is now written as its number before the default port is
left out.
On Windows a child inherits every inheritable handle of the process
that starts it, so the lingering child in
a_failing_command_returns_while_another_process_holds_its_stderr also
holds the command's standard output. The call then ends with a read
timeout instead of the exit error the test expects, which failed the
Windows gate. The test now runs only on Unix.
- A Windows drive-relative input (`C:a.rs`) is keyed by the file it
opens under the current folder of its drive, so it deduplicates with
the absolute path and takes part in the mixed-kind conflict check.
- A `<` opens generic brackets where an operand starts
(`<Pair<A, B> as Fixture>::LABEL`, also after `return` and the like),
in the type of a declared field or parameter (`field: Pair<A, B>`),
and in a tuple field, so their commas do not end the test-only
region. Fields and parameters count as declared only in the braces or
parentheses of a struct, union, enum variant or function, so a
comparison in a struct expression (`probe: a < b`) stays one.
- A closure after a borrow (`&|_, _|`, `&mut move |..|`) keeps its
parameter commas.
- A raw identifier (`r#let`) is read as one word and is never taken for
a keyword.
- drain_left gives the part of DRAIN after the exit that is left when
standard output closes, and output passes it to Head::finish.
- The test the_stderr_wait_ends_drain_after_the_exit checks the wait
when standard output closes at the exit, half of DRAIN after it, and
at or past DRAIN after it.