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

Adding keys fn to get all the log entry keys #4

Merged
merged 2 commits into from
Dec 31, 2019
Merged

Adding keys fn to get all the log entry keys #4

merged 2 commits into from
Dec 31, 2019

Conversation

athos
Copy link
Owner

@athos athos commented Dec 28, 2019

It's sometimes useful to be able to get all the log entry keys stored in a session without completing the log entries, especially for programmatically managing log entries.

(require '[postmortem.core :as pm])

(defn f [x]
  (pm/dump :args)
  (pm/spy>> :ret (inc x)))

(pm/keys) ;=> #{}

(f 42)
;; pm/keys never triggers completion of log entries
(pm/keys) ;=> #{:args :ret}
(pm/completed? :args) ;=> false
(pm/completed? :ret) ;=> false

;; while pm/logs does
(pm/logs) ;=> {:args [{:x 42}], :ret [43]}
(pm/completed? :args) ;=> true
(pm/completed? :ret) ;=> true

This feature adds a new method to ILogStorage, which comes with a minor breaking change only a few users (if any) may be affected.

@codecov
Copy link

codecov bot commented Dec 31, 2019

Codecov Report

Merging #4 into master will decrease coverage by 0.12%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #4      +/-   ##
==========================================
- Coverage   91.79%   91.66%   -0.13%     
==========================================
  Files           7        7              
  Lines         329      336       +7     
  Branches       16       17       +1     
==========================================
+ Hits          302      308       +6     
  Misses         11       11              
- Partials       16       17       +1
Impacted Files Coverage Δ
src/postmortem/protocols.cljc 100% <ø> (ø) ⬆️
src/postmortem/session.cljc 93.97% <100%> (+0.22%) ⬆️
src/postmortem/core.cljc 85.22% <75%> (-0.49%) ⬇️

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 2bc951b...27fd242. Read the comment docs.

@athos athos merged commit 4e622a1 into master Dec 31, 2019
@athos athos deleted the feature/keys branch December 31, 2019 04:12
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.

1 participant