Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify non compliant decoration test #851

Merged
merged 2 commits into from Feb 25, 2022

Conversation

sywhang
Copy link
Contributor

@sywhang sywhang commented Feb 25, 2022

This modifies a test that was added in a previous commit which highlights
a problematic transitive decoration of a parent-module provided-type.

Specifically, consider the following case:

  • Parent Module provides type A, and type B which depends on type A.
  • Child Module decorates type A and invokes something that depends on type B.

In such case, the invoked function in child Module should not see a version of
type B created with a decorated type A.

This is because the constructor for the type B lives outside the scope of the
decoration. The decoration can only affect child Scope's providers, and should
not affect parent-provided constructor directly.

This test case is not compliant with such case, so it should be modified.

This also pins Dig dependency to latest commit of Dig's master branch to take
in the fix made in uber-go/dig#325.

This removes a test that was added in a previous commit which highlights
a problematic transitive decoration of a parent-module provided-type.

Specifically, consider the following case.

Parent Module provides type A, and type B which depends on type A.
Child Module decorates type A and invokes something that depends on type B.

In such case, the invoked function in child Module should not see a version of
type B created with a decorated type A.

This is because the constructor for the type B lives outside the scope of the
decoration. The decoration can only affect child Scope's providers, and should
not affect parent-provided constructor directly.

This test case is not compliant with such case, so it should be modified.
@codecov
Copy link

codecov bot commented Feb 25, 2022

Codecov Report

Merging #851 (73a4997) into master (e279a3d) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #851   +/-   ##
=======================================
  Coverage   98.45%   98.45%           
=======================================
  Files          30       30           
  Lines        1100     1100           
=======================================
  Hits         1083     1083           
  Misses         11       11           
  Partials        6        6           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e279a3d...73a4997. Read the comment docs.

@sywhang sywhang merged commit b7c8e10 into uber-go:master Feb 25, 2022
@sywhang sywhang deleted the remove-non-compliant-decoration-test branch February 25, 2022 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants