Skip to content

Commit a4ef992

Browse files
committed
Ensure all map values are stringified.
Fixed an issue where sometimes keywords where not being converted to strings. Closes #36 -=david=-
1 parent c3c13e8 commit a4ef992

File tree

7 files changed

+34
-18
lines changed

7 files changed

+34
-18
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
restore-keys: ${{ env.APPLICATION }}-${{ hashFiles('deps.edn') }}
3131

3232
- name: Setup Java
33-
uses: actions/setup-java@v2
33+
uses: actions/setup-java@v3
3434
with:
3535
distribution: 'temurin'
3636
java-version: ${{ matrix.java }}

CHANGELOG.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ commits since the beginning of this repository.
1616
### Added
1717
### Removed
1818

19+
## [5.6.170]
20+
21+
### Changed
22+
23+
- Fixed an issue where sometimes keywords where not being converted to strings #36
24+
- Bumped various libraries
25+
1926
## [5.6.169]
2027

2128
### Changed
@@ -243,8 +250,9 @@ commits since the beginning of this repository.
243250
compatible with Sentry 10.0.1 and below. If you wish to use those
244251
versions, please continue to use sentry-clj 1.7.30.
245252

246-
[Unreleased]: https://github.com/getsentry/sentry-clj/compare/5.6.169...HEAD
247-
[5.6.169]: https://github.com/getsentry/sentry-clj/compare/5.5.166...5.6.169
253+
[Unreleased]: https://github.com/getsentry/sentry-clj/compare/5.6.170...HEAD
254+
[5.6.170]: https://github.com/getsentry/sentry-clj/compare/5.6.169...5.6.170
255+
[5.6.169]: https://github.com/getsentry/sentry-clj/compare/5.6.166...5.6.169
248256
[5.6.166]: https://github.com/getsentry/sentry-clj/compare/5.5.165...5.6.166
249257
[5.5.165]: https://github.com/getsentry/sentry-clj/compare/5.5.164...5.5.165
250258
[5.5.164]: https://github.com/getsentry/sentry-clj/compare/5.5.163...5.5.164

deps.edn

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@
77
io.sentry/sentry {:mvn/version "5.6.1"}
88
ring/ring-core {:mvn/version "1.9.5"}}
99

10-
:aliases {:build {:deps {io.github.seancorfield/build-clj {:git/tag "v0.6.7"
11-
:git/sha "22c2d09"}}
10+
:aliases {:build {:deps {io.github.seancorfield/build-clj {:git/tag "v0.7.0"
11+
:git/sha "5d2cb60"}}
1212
:ns-default scripts.build}
1313

1414
:test {:extra-paths ["test"]
1515
:extra-deps {cheshire/cheshire {:mvn/version "5.10.2"}
1616
com.github.seancorfield/expectations {:mvn/version "2.0.157"}
17-
lambdaisland/kaocha {:mvn/version "1.62.993"}
17+
lambdaisland/kaocha {:mvn/version "1.63.998"}
1818
lambdaisland/kaocha-cloverage {:mvn/version "1.0.75"}
1919
lambdaisland/kaocha-junit-xml {:mvn/version "0.0.76"}
2020
orchestra/orchestra {:mvn/version "2021.01.01-1"}
2121
org.clojure/test.check {:mvn/version "1.1.1"}}}
2222

23-
:antq {:replace-deps {com.github.liquidz/antq {:mvn/version "1.4.0"}
24-
org.slf4j/slf4j-nop {:mvn/version "1.7.35"}}
23+
:antq {:replace-deps {com.github.liquidz/antq {:mvn/version "1.5.1"}
24+
org.slf4j/slf4j-nop {:mvn/version "1.7.36"}}
2525
:exec-fn antq.tool/outdated
2626
:exec-args {:directory ["."]
2727
:skip ["pom"]

examples/basic/deps.edn

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
;;
77
ch.qos.logback/logback-classic {:mvn/version "1.2.10"}
88
io.sentry/sentry {:mvn/version "5.6.1"}
9-
io.sentry/sentry-clj {:mvn/version "5.6.169"}
9+
io.sentry/sentry-clj {:mvn/version "5.6.170"}
1010
org.clojure/tools.cli {:mvn/version "1.0.206"}
1111
org.clojure/tools.logging {:mvn/version "1.2.4"}
12-
org.slf4j/jcl-over-slf4j {:mvn/version "1.7.35"}
13-
org.slf4j/jul-to-slf4j {:mvn/version "1.7.35"}
14-
org.slf4j/log4j-over-slf4j {:mvn/version "1.7.35"}
15-
org.slf4j/slf4j-api {:mvn/version "1.7.35"}}}
12+
org.slf4j/jcl-over-slf4j {:mvn/version "1.7.36"}
13+
org.slf4j/jul-to-slf4j {:mvn/version "1.7.36"}
14+
org.slf4j/log4j-over-slf4j {:mvn/version "1.7.36"}
15+
org.slf4j/slf4j-api {:mvn/version "1.7.36"}}}

examples/uncaught/deps.edn

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
io.sentry/sentry-clj {:mvn/version "5.6.169"}
1010
org.clojure/tools.cli {:mvn/version "1.0.206"}
1111
org.clojure/tools.logging {:mvn/version "1.2.4"}
12-
org.slf4j/jcl-over-slf4j {:mvn/version "1.7.35"}
13-
org.slf4j/jul-to-slf4j {:mvn/version "1.7.35"}
14-
org.slf4j/log4j-over-slf4j {:mvn/version "1.7.35"}
15-
org.slf4j/slf4j-api {:mvn/version "1.7.35"}}}
12+
org.slf4j/jcl-over-slf4j {:mvn/version "1.7.36"}
13+
org.slf4j/jul-to-slf4j {:mvn/version "1.7.36"}
14+
org.slf4j/log4j-over-slf4j {:mvn/version "1.7.36"}
15+
org.slf4j/slf4j-api {:mvn/version "1.7.36"}}}

src/sentry_clj/core.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
on walk/stringify-keys."
2828
[m]
2929
(let [f (fn [[k v]]
30-
(let [k (if (keyword? k) (name k) k)]
30+
(let [k (if (keyword? k) (name k) k)
31+
v (if (keyword? v) (name v) v)]
3132
(if (map? v) [k (HashMap. ^Map v)] [k v])))]
3233
(walk/postwalk (fn [x] (if (map? x) (into {} (map f x)) x)) m)))
3334

test/sentry_clj/core_test.clj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818
(expect SentryLevel/ERROR (#'sut/keyword->level :error))
1919
(expect SentryLevel/FATAL (#'sut/keyword->level :fatal))))
2020

21+
(defexpect java-util-hashmappify-vals-tests
22+
(expecting
23+
"everything is a string"
24+
(expect {"a" "b"} (#'sut/java-util-hashmappify-vals {:a :b}))
25+
(expect {"a" "b" {"c" "d"} (#'sut/java-util-hashmappify-vals {:a {:b {:c :d}}})})
26+
(expect {"var1" "val1" "var2" {"a" {"b" {"c" {"d" {"e" "f"} "g" "h"}}}}} (#'sut/java-util-hashmappify-vals {:var1 "val1" :var2 {:a {:b {:c {:d {:e :f} :g :h}}}}}))))
27+
2128
(def event
2229
{:event-id (UUID/fromString "4c4fbea9-57a7-4c99-808d-2284306e6c98")
2330
:message {:message "ok" :params ["foo" "bar"]}

0 commit comments

Comments
 (0)