Skip to content

airframe-di: Show binding line numbers#530

Merged
xerial merged 11 commits intowvlet:masterfrom
xerial:bind-line-number
Jul 3, 2019
Merged

airframe-di: Show binding line numbers#530
xerial merged 11 commits intowvlet:masterfrom
xerial:bind-line-number

Conversation

@xerial
Copy link
Copy Markdown
Member

@xerial xerial commented Jul 3, 2019

This PR is for showing the source code location when some binding error happens:

[MISSING_DEPENDENCY] Binding for String at AirframeTest.scala:253 is not found: String  - (AirframeTest.scala:371)

This also embeds SourceCode information where the binding is defined in the design. It will be shown at trace log when AirframeSession resolves the dependency. This information will be useful to draw dependency graphs of DI, which will be in another PR.

@xerial xerial mentioned this pull request Jul 3, 2019
66 tasks
@xerial xerial requested a review from takezoe July 3, 2019 01:20
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 3, 2019

Codecov Report

Merging #530 into master will increase coverage by <.01%.
The diff coverage is 92.68%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #530      +/-   ##
==========================================
+ Coverage   83.72%   83.73%   +<.01%     
==========================================
  Files         216      217       +1     
  Lines        8000     8004       +4     
  Branches      578      577       -1     
==========================================
+ Hits         6698     6702       +4     
  Misses       1302     1302
Impacted Files Coverage Δ
.../src/main/scala/wvlet/airframe/config/Config.scala 98.52% <ø> (ø) ⬆️
...rframe/src/main/scala/wvlet/airframe/package.scala 91.66% <ø> (ø) ⬆️
...la/wvlet/airframe/http/recorder/HttpRecorder.scala 96.55% <ø> (ø) ⬆️
...src/main/scala/wvlet/airframe/config/package.scala 88.88% <100%> (ø) ⬆️
.../main/scala/wvlet/airframe/AirframeException.scala 100% <100%> (ø) ⬆️
...rframe/src/main/scala/wvlet/airframe/Session.scala 92% <100%> (ø) ⬆️
...irframe/src/main/scala/wvlet/airframe/Design.scala 98.07% <100%> (ø) ⬆️
...ame/src/main/scala/wvlet/airframe/SourceCode.scala 100% <100%> (ø)
...irframe/src/main/scala/wvlet/airframe/Binder.scala 70% <85.71%> (+2.14%) ⬆️
...rc/main/scala/wvlet/airframe/AirframeSession.scala 93.06% <90.9%> (+0.06%) ⬆️
... and 1 more

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 7c00297...14d2940. Read the comment docs.

Copy link
Copy Markdown
Member

@takezoe takezoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me with a trivial comment!

Comment thread airframe-macros/src/main/scala/wvlet/airframe/AirframeMacros.scala
@xerial xerial merged commit a136907 into wvlet:master Jul 3, 2019
@xerial xerial deleted the bind-line-number branch July 3, 2019 09:55
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.

2 participants