File tree Expand file tree Collapse file tree 5 files changed +20
-4
lines changed
Expand file tree Collapse file tree 5 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 7474 :exclude-linters [:implicit-dependencies ]}}
7575 :clj-kondo [:test
7676 {:dependencies [[clj-kondo " 2021.06.18" ]]}]}
77- :jvm-opts [" -Djava.net.preferIPv4Stack=true" ])
77+
78+ :jvm-opts ~(cond-> [" -Djava.net.preferIPv4Stack=true" ]
79+ (System/getenv " CI" )
80+ (conj " -Drefactor-nrepl.internal.log-exceptions=true" )))
Original file line number Diff line number Diff line change 9191 (when ns
9292 (if-let [cached-ast-or-err (get-ast-from-cache ns file-content)]
9393 cached-ast-or-err
94- (when-let [new-ast-or-err (try (build-ast ns aliases) (catch Throwable th th))]
94+ (when-let [new-ast-or-err (try
95+ (build-ast ns aliases)
96+ (catch Throwable th
97+ (when (System/getProperty " refactor-nrepl.internal.log-exceptions" )
98+ (-> th .printStackTrace))
99+ th))]
95100 (update-ast-cache file-content ns new-ast-or-err))))))
96101
97102(defn- throw-ast-in-bad-state
131136 (doseq [f (tracker/project-files-in-topo-order )]
132137 (try
133138 (ns-ast (slurp f))
134- (catch Throwable _th))) ; noop, ast-status will be reported separately
139+ (catch Throwable th
140+ (when (System/getProperty " refactor-nrepl.internal.log-exceptions" )
141+ (-> th .printStackTrace))
142+ nil ; noop, ast-status will be reported separately
143+ )))
135144 (ast-stats ))
136145
137146(defn node-at-loc? [^long loc-line ^long loc-column node]
Original file line number Diff line number Diff line change 8585 (mapcat #(try
8686 (get-macro-definitions-in-file-with-caching %)
8787 (catch Exception e
88+ (when (System/getProperty " refactor-nrepl.internal.log-exceptions" )
89+ (-> e .printStackTrace))
8890 (when-not ignore-errors?
8991 (throw e)))))))
9092
Original file line number Diff line number Diff line change 109109 (find-symbol-in-ast fully-qualified-name)
110110 (filter :line-beg ))
111111 (catch Exception e
112+ (when (System/getProperty " refactor-nrepl.internal.log-exceptions" )
113+ (-> e .printStackTrace))
112114 (when-not ignore-errors
113115 (throw e))))
114116 locs (into
Original file line number Diff line number Diff line change 5252
5353(defn ns-ast-throw-error-for-five [^String content]
5454 (if (.contains content " com.example.five" )
55- (throw (IllegalThreadStateException. " FAILED !" ))
55+ (throw (IllegalThreadStateException. " Expected !" ))
5656 (#'analyzer/cachable-ast content)))
5757
5858(deftest test-find-two-foo-errors-ignored
You can’t perform that action at this time.
0 commit comments