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

refactor: remove DIContainer abstraction #196

Merged
merged 4 commits into from
Sep 22, 2021
Merged

refactor: remove DIContainer abstraction #196

merged 4 commits into from
Sep 22, 2021

Conversation

Reasno
Copy link
Member

@Reasno Reasno commented Sep 22, 2021

This PR makes core tightly coupled to uber/dig. While this is counter-intuitive, the previous abstraction was very leaky. Most components implicitly depend on uber/dig specific features, such as dig.In, dig.Out and optional:"true" tags.

The rationale of this PR is: good abstraction > no abstraction > bad/leacky abstration.

After this change, the core and components are free to use uber/dig's advanced features. I expect this will make developer UX much better.

@codecov
Copy link

codecov bot commented Sep 22, 2021

Codecov Report

Merging #196 (89c4384) into master (30380dd) will increase coverage by 0.00%.
The diff coverage is 88.88%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #196   +/-   ##
=======================================
  Coverage   82.25%   82.25%           
=======================================
  Files          88       89    +1     
  Lines        3392     3409   +17     
=======================================
+ Hits         2790     2804   +14     
- Misses        448      450    +2     
- Partials      154      155    +1     
Impacted Files Coverage Δ
ots3/uploader.go 85.85% <ø> (ø)
c.go 76.72% <70.00%> (-1.20%) ⬇️
di/optional_provider.go 87.50% <87.50%> (ø)
default_config.go 78.94% <100.00%> (ø)
di/populator.go 100.00% <100.00%> (ø)

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 30380dd...89c4384. Read the comment docs.

@Reasno Reasno changed the title fix: optimize debug message refactor: remove DIContainer abstraction Sep 22, 2021
@Reasno Reasno requested review from GGXXLL and lingwei0604 and removed request for GGXXLL September 22, 2021 09:08
@Reasno Reasno linked an issue Sep 22, 2021 that may be closed by this pull request
@Reasno Reasno merged commit ca53a9b into master Sep 22, 2021
@Reasno Reasno deleted the di branch September 22, 2021 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drop support for wire
2 participants