fix: round 2026 09 29 - #68
Merged
Merged
Conversation
A junction whose constructor needs an unregistered service failed its first run with "Could not find type: (IClock).", which names neither the junction, the train, nor whether the value was expected from an earlier junction or from the container. Every lookup that can miss now says who asked: a junction's constructor argument or input, an IChain's junction, an Extract's source and Resolve's result each name the junction or step, the train, the missing type, and what to do (register it, or chain a junction that outputs it first). A junction Trax cannot build from its constructor (more or fewer than one public constructor, abstract, or not a class) fails every run, so Chain<T>() and ShortCircuit<T>() now record it as a refusal when the chain is read, and the startup chain check refuses the host instead of the first run failing. A junction passed as an instance is not checked: its constructors never run. Resolve() of a value-type result that nothing produced returned the type's default as a success, because the missing value came back as default rather than null; it now fails. The new JunctionResolutionMessageTests failed against the old messages and recorder and pass with this change.
A null service threw a plain Exception out of AddServices at run time, while every other invalid argument records a TrainException on the chain. It now records a TrainException that names the type argument and, when several services are passed, its position, and stores none of that call's services. AddServicesNullParamTests failed with the thrown Exception before this change and pass after.
…ool timing The train in DeclaredChain_ABodyThatAwaitsBeforeReturning_IsRefused awaited Task.Yield, so on a fast thread pool the rest of its body could finish before DeclaredChain checked whether the declaration had completed, and no refusal was recorded. It failed that way once in CI under the Release build. The body now awaits a task that never completes, which is what the test means by a body that awaits something before returning.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Contributor
|
This PR is included in version 1.7.6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.