Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

chore: remove circular dependency #96

Merged
merged 1 commit into from
Jun 17, 2021

Conversation

dyladan
Copy link
Member

@dyladan dyladan commented Jun 16, 2021

Fixes #87

The global-utils.ts depends on the diag API, which depends on global-utils. This results in a circular dependency.

Resolve by injecting the diag instance into the function at call time.

/cc @MSNev

@codecov
Copy link

codecov bot commented Jun 16, 2021

Codecov Report

Merging #96 (b4055cf) into main (25cf8a4) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head b4055cf differs from pull request most recent head b00dc22. Consider uploading reports for the commit b00dc22 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main      #96      +/-   ##
==========================================
+ Coverage   94.83%   94.84%   +0.01%     
==========================================
  Files          42       42              
  Lines         561      563       +2     
  Branches       87       87              
==========================================
+ Hits          532      534       +2     
  Misses         29       29              
Impacted Files Coverage Δ
src/api/context.ts 96.29% <100.00%> (+0.14%) ⬆️
src/api/diag.ts 100.00% <100.00%> (ø)
src/api/propagation.ts 100.00% <100.00%> (ø)
src/api/trace.ts 96.77% <100.00%> (+0.10%) ⬆️
src/internal/global-utils.ts 90.62% <100.00%> (-0.29%) ⬇️

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 25cf8a4...b00dc22. Read the comment docs.

@dyladan dyladan merged commit 7441fea into open-telemetry:main Jun 17, 2021
@dyladan dyladan deleted the circular-fix branch June 17, 2021 12:12
@dyladan dyladan added the bug Something isn't working label Jun 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Circular dependency
5 participants