Skip to content

Commit

Permalink
chore: verbose mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mtshiba committed Sep 9, 2024
1 parent bb967ab commit aa1e6ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/build.er
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ ac = import "ansicolor"
{download_dependencies_on_demand!;} = import "download"
{load_package_er_as_json!;} = import "metadata"

.compile_command! vers: Versions! =
.compile_command! vers: Versions!, cfg: Config =
cmd as List!(Str, _) = !["erg", "compile"]
if! cfg.verbose, do!:
cmd.push! "--verbose"
cmd.push! "2"
metadata = load_package_er_as_json!()
if! metadata.get("py_command") isnot! None, do!:
cmd.push! "--py-command"
Expand All @@ -38,7 +41,7 @@ ac = import "ansicolor"
.build! cfg: Config =
start = time!()
vers = download_dependencies_on_demand! cfg
cmd = .compile_command! vers
cmd = .compile_command! vers, cfg
print! "\{ac.GREEN}Building\{ac.RESET}: \{cfg.project_root.stem}"
metadata = load_package_er_as_json!()
if! metadata.get("pre_build") isnot! None, do!:
Expand Down
2 changes: 1 addition & 1 deletion src/test.er
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ exc = import "exception"
assert name in Str
# TODO: filter out src dependencies
vers = Versions!.from_package_lock_er!()
cmd = compile_command! if! vers != None, do! vers, do! Versions!.new!()
cmd = compile_command! if!(vers != None, do! vers, do! Versions!.new!()), cfg

cmd.push! "--use-local-package"
cmd.push! name
Expand Down

0 comments on commit aa1e6ba

Please sign in to comment.