[DependencyInjection] Make DefinitionErrorExceptionPass
consider IGNORE_ON_UNINITIALIZED_REFERENCE
and RUNTIME_EXCEPTION_ON_INVALID_REFERENCE
the same
#60423
+7
−1
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.
The test container can make runtime errors appear at compile-time: say you have a private definition referenced by a controller. Such a reference would be configured with
RUNTIME_EXCEPTION_ON_INVALID_REFERENCE
, so if the private definition references an errored one, you’d get no exception at compile-time.Now, if this private definition is also referenced by the test container, it would be as
IGNORE_ON_UNINITIALIZED_REFERENCE
. This would changeDefinitionErrorExceptionPass::isErrorForRuntime()
result and trigger a compile-time exception.Following #60423 (comment), this PR makes the
DefinitionErrorExceptionPass
considerIGNORE_ON_UNINITIALIZED_REFERENCE
the same way thanRUNTIME_EXCEPTION_ON_INVALID_REFERENCE
to fix this issue.