|
149 | 149 | (by host delimiter))
|
150 | 150 | (,, (template.with [<name>]
|
151 | 151 | [(the (<name> path)
|
152 |
| - (monad.let future.monad |
153 |
| - [?/0 (by cache <name> path) |
154 |
| - ?/1 (by host <name> path)] |
155 |
| - (pure (or ?/0 ?/1))))] |
| 152 | + (if (cache.path? cache path) |
| 153 | + (by cache <name> path) |
| 154 | + (by host <name> path)))] |
156 | 155 |
|
157 | 156 | [[file?]
|
158 | 157 | [directory?]]))
|
| 158 | + (the (read path) |
| 159 | + (if (cache.path? cache path) |
| 160 | + (by cache read path) |
| 161 | + (by host read path))) |
159 | 162 | (,, (template.with [<name>]
|
160 | 163 | [(the <name>
|
161 | 164 | (by cache <name>))]
|
|
167 | 170 | [file_size]
|
168 | 171 | [last_modified]
|
169 | 172 | [can_execute?]
|
170 |
| - [delete]])) |
171 |
| - (the (read path) |
172 |
| - (monad.let future.monad |
173 |
| - [it (by cache read path)] |
174 |
| - (when it |
175 |
| - {try.#Failure _} |
176 |
| - (by host read path) |
177 |
| - |
178 |
| - _ |
179 |
| - (pure it)))) |
180 |
| - (,, (template.with [<name>] |
181 |
| - [(the <name> |
182 |
| - (by cache <name>))] |
183 |
| - |
184 |
| - [[modify] |
| 173 | + [delete] |
| 174 | + |
| 175 | + [modify] |
185 | 176 | [write]
|
186 | 177 | [append]
|
187 | 178 | [move]]))
|
|
276 | 267 | tar)]
|
277 | 268 | (pure [])))))
|
278 | 269 |
|
279 |
| - (the (cache! original_fs context platform) |
| 270 | + (the (cache! host_fs context platform) |
280 | 271 | (for_any (_ <parameters>)
|
281 | 272 | (-> (file.System Future) Context (Platform <parameters>)
|
282 | 273 | (Future (Try Any))))
|
283 | 274 | (monad.let (try.with future.monad)
|
284 | 275 | [cache (cache_tar context (its platform.#file_system platform))]
|
285 |
| - (by original_fs write |
286 |
| - (cache_path original_fs context) |
| 276 | + (by host_fs write |
| 277 | + (cache_path host_fs context) |
287 | 278 | (by tar.binary as cache))))
|
288 | 279 |
|
289 | 280 | (the (with_cache it)
|
|
294 | 285 | [cache_fs
|
295 | 286 | (revised platform.#file_system (hybrid_fs cache_fs) it)]))
|
296 | 287 |
|
297 |
| - (the (enable_output! original_fs context) |
| 288 | + (the (enable_output! host_fs context) |
298 | 289 | (-> (file.System Future) Context
|
299 | 290 | (Future (Try Any)))
|
300 | 291 | (let [target_root (its context.#target context)]
|
301 | 292 | (monad.let [! future.monad]
|
302 |
| - [? (by original_fs directory? target_root)] |
| 293 | + [? (by host_fs directory? target_root)] |
303 | 294 | (if ?
|
304 | 295 | (pure {try.#Success []})
|
305 |
| - (file.make_directories ! original_fs target_root))))) |
| 296 | + (file.make_directories ! host_fs target_root))))) |
306 | 297 |
|
307 | 298 | (the .public (compiler lux_compiler file_context
|
308 | 299 | expander host_analysis platform translation_bundle host_declaration_bundle program global extender
|
|
328 | 319 | (<| (or_crash! "Compilation failed:")
|
329 | 320 | ..timed
|
330 | 321 | (monad.let [! (try.with !)]
|
331 |
| - [.let [original_fs (its platform.#file_system platform) |
| 322 | + [.let [host_fs (its platform.#file_system platform) |
332 | 323 | [cache_fs platform] (with_cache platform)]
|
333 |
| - _ (enable_output! original_fs file_context) |
334 |
| - _ (load_cache! original_fs cache_fs file_context) |
| 324 | + _ (enable_output! host_fs file_context) |
| 325 | + _ (load_cache! host_fs cache_fs file_context) |
335 | 326 | import (import.import (its platform.#file_system platform) (its cli.#libraries compilation))
|
336 | 327 | .let [all_extensions [(analysisE.bundle host_analysis)
|
337 | 328 | synthesisE.bundle
|
|
375 | 366 | {try.#Success [archive state]}
|
376 | 367 | (monad.let !
|
377 | 368 | [_ (cache/archive.cache! (its platform.#file_system platform) (its cli.#configuration compilation) archive)
|
378 |
| - _ (cache! original_fs file_context platform) |
| 369 | + _ (cache! host_fs file_context platform) |
379 | 370 | host_dependencies (..load_host_dependencies (its platform.#file_system platform)
|
380 | 371 | (its cli.#host_dependencies compilation))
|
381 | 372 |
|
382 | 373 | _ (..package! file_context
|
383 |
| - original_fs |
| 374 | + host_fs |
384 | 375 | host_dependencies
|
385 | 376 | packager,package
|
386 | 377 | archive
|
|
389 | 380 |
|
390 | 381 | {try.#Failure error}
|
391 | 382 | (monad.let !
|
392 |
| - [_ (cache! original_fs file_context platform)] |
| 383 | + [_ (cache! host_fs file_context platform)] |
393 | 384 | (future#pure {try.#Failure error})))))
|
394 | 385 |
|
395 | 386 | {cli.#Export export}
|
|
0 commit comments