|
125 | 125 | (parameterize ([current-custodian cust]) |
126 | 126 | (thread |
127 | 127 | (λ () |
128 | | - (define no-annotations? |
129 | | - ;; if there is an annotation set up, then this compiled |
130 | | - ;; code won't be the right compiled code, so don't save it |
131 | | - (equal? (prefab-module-settings-annotations settings) 'none)) |
132 | 128 | (ep-log-info "expanding-place.rkt: 00 starting monitors") |
133 | 129 | (for ([handler (in-list handlers)]) |
134 | 130 | (define pc (handler-monitor-pc handler)) |
|
168 | 164 | loaded-paths)) |
169 | 165 | (cl path mod-name)))) |
170 | 166 | (ep-log-info "expanding-place.rkt: 03 setting module language parameters") |
171 | | - (when (equal? (prefab-module-settings-annotations settings) 'debug) |
172 | | - (current-compile |
173 | | - (make-debug-compile-handler/errortrace-annotate |
174 | | - (current-compile) |
175 | | - errortrace-annotate))) |
176 | 167 | (set-module-language-parameters settings |
177 | 168 | module-language-parallel-lock-client |
178 | 169 | null |
|
222 | 213 | (namespace-syntax-introduce stx) |
223 | 214 | raise-hopeless-syntax-error)) |
224 | 215 | (define log-io? (log-level? expanding-place-logger 'warning)) |
225 | | - (define-values (in out) |
226 | | - (if (or log-io? no-annotations?) |
227 | | - (make-pipe) |
228 | | - (values #f (open-output-nowhere)))) |
| 216 | + (define-values (in out) (make-pipe)) |
229 | 217 | (define the-io (make-channel)) |
230 | 218 | (cond |
231 | 219 | [log-io? |
232 | 220 | (thread (λ () (catch-and-log in the-io)))] |
233 | | - [no-annotations? |
| 221 | + [else |
234 | 222 | (thread (λ () (catch-and-check-non-empty in the-io)))]) |
235 | 223 | (ep-log-info "expanding-place.rkt: 09 starting expansion") |
236 | 224 | (define expanded |
|
239 | 227 | (expand transformed-stx))) |
240 | 228 | (ep-log-info "expanding-place.rkt: 10 finished expansion") |
241 | 229 | (define no-io-happened? |
242 | | - (cond |
243 | | - [(or log-io? no-annotations?) |
244 | | - (close-output-port out) |
245 | | - (channel-get the-io)] |
246 | | - [else #f])) |
| 230 | + (begin |
| 231 | + (close-output-port out) |
| 232 | + (channel-get the-io))) |
247 | 233 | (channel-put old-registry-chan |
248 | 234 | (namespace-module-registry (current-namespace))) |
249 | 235 | (place-channel-put pc-status-expanding-place 'finished-expansion) |
|
278 | 264 | (ep-log-info "expanding-place.rkt: 12 handlers finished") |
279 | 265 | (define compiled-bytes |
280 | 266 | (cond |
281 | | - [(and no-annotations? |
282 | | - ;; we don't try to reuse the compiled bytes |
283 | | - ;; if there was any IO because we cannot tell |
284 | | - ;; which part is to be replayed and which |
285 | | - ;; isn't; just re-run the expansion on the |
286 | | - ;; user's side so they see the IO directly |
287 | | - no-io-happened?) |
| 267 | + [no-io-happened? |
| 268 | + ;; we don't try to reuse the compiled bytes |
| 269 | + ;; if there was any IO because we cannot tell |
| 270 | + ;; which part is to be replayed and which |
| 271 | + ;; isn't; just re-run the expansion on the |
| 272 | + ;; user's side so they see the IO directly |
288 | 273 | (define compiled (compile expanded)) |
289 | 274 | (define bp (open-output-bytes)) |
290 | 275 | (define write-succeeded? |
|
0 commit comments