diff options
author | Eduardo Julian | 2020-04-19 00:25:35 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-04-19 00:25:35 -0400 |
commit | a5e87f66c4588ac23201d00cc55a748b6088eb96 (patch) | |
tree | f8f9795a7b094c52e9aba8bb58fec4d536d24ceb /stdlib/source/lux/tool/compiler/default/platform.lux | |
parent | 4955cfe6f248a039e95b404f26abfae04204740f (diff) |
Fixed artifact file-name generation and archive module naming in caching.
Diffstat (limited to 'stdlib/source/lux/tool/compiler/default/platform.lux')
-rw-r--r-- | stdlib/source/lux/tool/compiler/default/platform.lux | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/stdlib/source/lux/tool/compiler/default/platform.lux b/stdlib/source/lux/tool/compiler/default/platform.lux index fa519d8a2..7419ddac5 100644 --- a/stdlib/source/lux/tool/compiler/default/platform.lux +++ b/stdlib/source/lux/tool/compiler/default/platform.lux @@ -57,17 +57,16 @@ <State+> (as-is (///directive.State+ anchor expression directive)) <Bundle> (as-is (///generation.Bundle anchor expression directive))] - (def: (cache-module platform host target-dir module-file-name module-name output ## module - ) + (def: (cache-module platform host target-dir module-file-name module-id extension output) (All <type-vars> - (-> <Platform> Host Path Path Text Output ## Module + (-> <Platform> Host Path Path archive.ID Text Output (Promise (Try Any)))) (let [system (get@ #&file-system platform) write-artifact! (: (-> [Text Binary] (Promise (Try Any))) (function (_ [name content]) - (ioW.write system host target-dir module-name name content)))] + (ioW.write system host target-dir module-id name extension content)))] (do (try.with promise.monad) - [_ (ioW.prepare system host target-dir module-name) + [_ (ioW.prepare system host target-dir module-id) _ (|> output row.to-list (monad.map promise.monad @@ -162,9 +161,9 @@ ## (io.fail error)) ) - (def: #export (compile target partial-host-extension expander platform host configuration archive state) + (def: #export (compile target partial-host-extension expander platform host configuration archive extension state) (All <type-vars> - (-> Text Text Expander <Platform> Host Configuration Archive <State+> (Promise (Try [Archive <State+>])))) + (-> Text Text Expander <Platform> Host Configuration Archive Text <State+> (Promise (Try [Archive <State+>])))) (let [source-module (get@ #cli.module configuration) compiler (:share <type-vars> {<State+> @@ -182,7 +181,7 @@ (Promise (Try [Archive <State+>]))) recur})] (do (try.with promise.monad) - [[_module-id archive] (promise@wrap (archive.reserve module archive)) + [[module-id archive] (promise@wrap (archive.reserve module archive)) input (context.read (get@ #&file-system platform) (get@ #cli.sources configuration) partial-host-extension @@ -233,10 +232,9 @@ host target (get@ #///.file input) - module - output - ## module - )] + module-id + extension + output)] (case (archive.add module descriptor+document archive) (#try.Success archive) (wrap [archive state]) |