JuliaLogging / ProgressLogging.jl

MIT License
50 stars 8 forks source link

Ducktyping #34

Open pfitzseb opened 4 years ago

pfitzseb commented 4 years ago

Ok, this may look a bit weird, but makes sure we support arbitrary objects (with the right fields) instead of only this package's Progress object.

The motivation for this is to add a nice progress frontend for VSCode while re-using ProgressLogging.asprogress and without forcing a specific version to be loaded (we're not loading this as a package in VSCode, only include the main file).

codecov-commenter commented 4 years ago

Codecov Report

Merging #34 into master will decrease coverage by 0.56%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #34      +/-   ##
==========================================
- Coverage   69.04%   68.47%   -0.57%     
==========================================
  Files           1        1              
  Lines         168      184      +16     
==========================================
+ Hits          116      126      +10     
- Misses         52       58       +6     
Impacted Files Coverage Δ
src/ProgressLogging.jl 68.47% <0.00%> (-0.57%) :arrow_down:

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 10208bc...70ccc2b. Read the comment docs.

c42f commented 4 years ago

This is a little confusing, given that I think you vendored most of ProgressLogging in julia-vscode over at https://github.com/julia-vscode/julia-vscode/pull/1579?

Overall if these kind of hacks are really required, it seems Logging itself is missing some key abstraction which lets frontends and backends interact cleanly (see also comments at https://github.com/julia-vscode/julia-vscode/pull/1579#issuecomment-697137079)