Skip to content

Commit dc355c9

Browse files
committed
Fix functions with docstrings evaluated via the shadow repl not compiling
1 parent 921c173 commit dc355c9

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44

55
### New Features
66
7+
### Changes
8+
9+
### Bugs fixed
10+
11+
- Fix functions with docstrings evaluated via the shadow repl not compiling
12+
13+
## 1.11.132-7 (12-12-2024)
14+
15+
### New Features
16+
717
### Changes
818

919
- Add debugger and bookmark macros for FlowStorm ergonomics

src/main/clojure/cljs/compiler.cljc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,12 @@
895895
(-> next-line
896896
(string/replace #"^ " "")
897897
(string/replace "*/" "* /"))))))]
898-
(when (seq docs)
898+
(when (and (seq docs)
899+
;; when we are in a shadow repl context we don't want to emit function docs
900+
;; comments because of the hacky wrapping we are doing.
901+
;; This shouldn't have any downsides, just don't emit docstring commets
902+
;; on functions evaluated from the shadow repl
903+
(not (:shadow.build.compiler/repl-context env)))
899904
(emitln "/**")
900905
(doseq [e docs]
901906
(when e

0 commit comments

Comments
 (0)