Skip to content

v0.13.1

Choose a tag to compare

@floatdrop floatdrop released this 07 Sep 13:00
· 3 commits to main since this release
c444499

Three defects reported in #35, each with a reproduction, each real. go doc -all against 0.13.0 is unchanged in di and dihttp; an upgrade cannot
break a caller, and every fix turns a panic, a false rejection or a lost
error into the behaviour the documentation already promised.

Fixed

  • Wire and Wrap accepted a result merely assignable to the key, such as a
    chan int for a <-chan int key or a []byte for a named slice type, and
    then stored it as the constructor's own type, so Get panicked asserting
    it. The value is stored as the key's type now (#35).
  • Validate reported a cycle where a valid graph visited one Scoped
    binding in two scopes. A node on its path is now a binding in a holder, as
    it is on a resolution path at run time, so the two instances are told
    apart (#35).
  • A Worker that returned its own failure joined with the cancellation, as
    errors.Join(ctx.Err(), err), had the failure dropped with the
    cancellation, and Stop returned nil. Only an error that says nothing
    beyond the cancellation is dropped now (#35).