Skip to content

Commit

Permalink
0.4.3 Parse record ctor syntax #7
Browse files Browse the repository at this point in the history
  • Loading branch information
tonsky committed Mar 21, 2024
1 parent 3196724 commit fda9fcc
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 0.4.3 - Mar 21, 2024

- Do not report self-reference as a cycle #6
- Parse record ctor syntax #7

# 0.4.2 - Mar 20, 2024

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This is only about namespace dependencies within a single project. It has nothin
## Dependency

```clojure
io.github.tonsky/clj-reload {:mvn/version "0.4.2"}
io.github.tonsky/clj-reload {:mvn/version "0.4.3"}
```

## The problem
Expand Down
4 changes: 0 additions & 4 deletions fixtures/core_test/a.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,3 @@
[z :as-alias z])
(:import
[java.io File]))

::b/kw
::z/kw
File
3 changes: 2 additions & 1 deletion src/clj_reload/util.clj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
sym)))

(defn read-form [reader]
(binding [*read-eval* false
(binding [*read-eval* false
*suppress-read* true
*reader-resolver* dummy-resolver]
(read reader-opts reader)))

Expand Down
10 changes: 10 additions & 0 deletions test/clj_reload/parse_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ Unexpected :require form: [567 :as a]
Unexpected :require form: [789 a b c]
" (str out)))))

(deftest reader-test
(is (= {} (read-str "#?(:clj 1 :cljs 2)")))
(is (= {} (read-str "{:a 1 #?@(:clj [:b 2] :cljs [:c 3])}")))
(is (= {} (read-str "#user.Y {:a 1}")))
(is (= {} (read-str "#x 1")))
(is (= {} (read-str "::kw")))
(is (= {} (read-str "::abc/kw")))
(is (= {} (read-str "java.io.File")))
(is (= {} (read-str "File"))))

(deftest scan-impl-test
(let [{files :files'
nses :namespaces'} (binding [util/*log-fn* nil]
Expand Down

0 comments on commit fda9fcc

Please sign in to comment.