generated from lucas/rust-webserver-template
chore(deps): update rust crate asserting to 0.17.0 (master) #11
No reviewers
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat/Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Tag/Good First Issue
Tag/Help Wanted
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/logview!11
Loading…
Reference in a new issue
No description provided.
Delete branch "renovate/master-asserting-0.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
0.15.0→0.17.0Release Notes
innoave/asserting (asserting)
v0.17.0Compare Source
Added
is_inassertions for all types that implementPartialEq(PR #100)
is_close_to_with_marginassertion for temporal types of thechrono-crate (optionalcrate feature "chrono")
(PR #101)
is_close_to_with_marginassertion for temporal types of thetime-crate (optional cratefeature "time")
(PR #102)
is_close_to_with_marginassertion for temporal types of thejiff-crate (optional cratefeature "jiff")
(PR #103)
Changed
DefinedOrderPropertytrait bound from collection and iterator assertion(PR #97)
(PR #104)
v0.16.2Compare Source
Fixed
(PR #99)
v0.16.1Compare Source
Fixed
(PR #98)
v0.16.0Compare Source
custom representation and asserting (foreign) types that do not implement
DebugAdded
(PR #96)
The API for writing custom expectations has changed. It now has an additional parameter
'representation' in many methods. Implementations of the Expectation trait should no longer
require implementing
Debugbut instead depend on theRepresent-trait.Note: This feature does not break anything when using the crate for writing assertions in tests.
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate CLI.
6c8562680d36ea83271a36ea83271a641c399e42Version bump alone is not enough: this is a breaking API change for
tests/common/assert.rs, and thepr / testjob on641c399fails with 25 compile errors (run #108). Details and the required migration are in the inline comment. The lockfile change is otherwise clean —chrono,jiffandtimeonly get recorded underasserting's dep list; no new[[package]]entries, so nothing new enters the graph.Side observation, not for this PR:
checkpassed while the code doesn't compile, because CI runscargo clippy -- -D warnings(no--all-targets), so test targets are only ever built by thetestjob.@ -32,3 +32,3 @@[dev-dependencies]asserting = "0.15.0"asserting = "0.17.0"This bump crosses the 0.16.0 "controlling type formatting in failure reports" break and the 0.17.0 module move, both of which hit our custom expectations in
tests/common/assert.rs.cargo teston this head fails to compile (25 errors, run #108 jobtest). The release note's "does not break anything when using the crate for writing assertions" only holds for callers that don't implementExpectationthemselves — we do.What has to change in
tests/common/assert.rsfor 0.17.0:Expectation<S>→Expectation<S, D>, andfn messagegains arepresentation: &Dparameter beforeformat(6 impls:HasHtmlAttr,HasHtmlText,HasHtmlSelector,HasHtmlFilter,HasHtmlCheck, …).Specis nowSpec<'a, S, D, R>(subject, representation, failing strategy), soSpecHtmlExt<'a, R>and itsimpl … for Spec<'a, Html, R>need the extra representation parameter — that's what makes thehas_html_*methods unresolvable onSpec<'_, Html, DebugRepresentation, CollectFailures>intests/views.rs/tests/web.rs.mark_unexpected(value, representation, format),mark_missing(value, representation, format),mark_all_items_in_collection(collection, representation, format, mark_fn), withD: Represent<T>(asserting::representation::{Represent, DebugRepresentation, DisplayRepresentation}). Passing the&DiffFormatas representation is exactly theDiffFormat: Represent<…>error.mark_missing_string/mark_unexpected_stringare gone fromasserting::colored. For the unquoted output we currently get from them, the equivalent ismark_missing(s, &DisplayRepresentation, format)/mark_unexpected(s, &DisplayRepresentation, format);mark_{unexpected,missing}_substring_in_stringexist for the substring case.For
Elementvalues,DebugRepresentationcompiles (scraper'sElement: Debug) but prints the raw node struct;el.html()withDisplayRepresentationis likely the nicer failure message — your call, since these helpers exist specifically for message quality.Until that migration lands, this PR can't be merged.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.