From 875b54e2cd3f8d380ae36efb5c086f576f0bde92 Mon Sep 17 00:00:00 2001 From: despiegk Date: Thu, 19 Dec 2024 20:27:00 +0100 Subject: [PATCH] fix for compile --- crystallib/biz/bizmodel/play_product_revenue.v | 4 ++-- crystallib/biz/spreadsheet/factory.v | 2 +- crystallib/biz/spreadsheet/wiki.v | 2 +- crystallib/builder/builder_factory.v | 2 +- crystallib/core/generator/generic/generator.v | 1 - crystallib/core/playcmds/play_core.v | 8 ++++---- crystallib/core/playcmds/play_luadns.v | 10 +++++----- crystallib/core/playcmds/play_mdbook.v | 2 +- crystallib/data/doctree/process_includes.v | 2 +- crystallib/data/doctree/scan.v | 2 +- crystallib/data/doctree/tree.v | 2 +- crystallib/develop/gittools/repository.v | 2 +- crystallib/installers/lang/nodejs/nodejs.v | 2 +- crystallib/installers/lang/vlang/v-analyzer.v | 2 +- .../installers/sysadmintools/garage_s3/configure.v | 2 +- .../installers/sysadmintools/grafana/grafana.v | 2 +- .../prometheus/alertmanager_installer.v | 2 +- .../sysadmintools/prometheus/blackbox_exporter.v | 2 +- .../sysadmintools/prometheus/node_exporter.v | 2 +- .../sysadmintools/prometheus/prom2json.v | 2 +- .../prometheus/prometheus_installer.v | 2 +- .../sysadmintools/rclone/rclone_actions.v | 4 ++-- crystallib/installers/upload.v | 2 +- crystallib/lang/python/shell.v | 2 +- crystallib/osal/rsync/rsyncd.v | 4 ++-- crystallib/threefold/grid/deployer.v | 2 +- crystallib/threefold/grid/vm.v | 2 +- .../threefold/grid4/farmingsimulator/factory.v | 2 +- .../grid4/farmingsimulator/model_nodesbatch.v | 2 +- crystallib/threefold/grid4/farmingsimulator/play.v | 2 +- crystallib/threefold/grid4/gridsimulator/factory.v | 2 +- crystallib/threefold/tfrobot/deploy.v | 6 ++---- crystallib/threefold/tfrobot/vm.v | 14 +++++--------- crystallib/web/components/calendar.v | 2 +- crystallib/web/components/feed.v | 2 +- crystallib/web/mdbook/mdbook.v | 4 ++-- 36 files changed, 51 insertions(+), 58 deletions(-) diff --git a/crystallib/biz/bizmodel/play_product_revenue.v b/crystallib/biz/bizmodel/play_product_revenue.v index 906c8c300..222d29346 100644 --- a/crystallib/biz/bizmodel/play_product_revenue.v +++ b/crystallib/biz/bizmodel/play_product_revenue.v @@ -95,7 +95,7 @@ fn (mut m BizModel) revenue_action(action Action) ! { product.has_oneoffs = true } - mut cogs_perc := m.sheet.row_new( + _ := m.sheet.row_new( name: '${name}_cogs_perc' growth: action.params.get_default('cogs_perc', '0')! tags: 'rev name:${name}' @@ -205,7 +205,7 @@ fn (mut m BizModel) revenue_action(action Action) ! { nrmonths: nr_months_recurring )! - nr_sold_recurring := nr_sold.recurring( + _ := nr_sold.recurring( name: '${name}_nr_sold_recurring' descr: 'Nr products active because of recurring for ${name2}' nrmonths: nr_months_recurring diff --git a/crystallib/biz/spreadsheet/factory.v b/crystallib/biz/spreadsheet/factory.v index 4c92ad3f6..12e36f1b4 100644 --- a/crystallib/biz/spreadsheet/factory.v +++ b/crystallib/biz/spreadsheet/factory.v @@ -39,7 +39,7 @@ pub fn sheet_new(args SheetNewArgs) !&Sheet { pub fn sheet_get(name string) !&Sheet { rlock sheets { if name in sheets { - return sheets[name] + return sheets[name] or { return error('Sheet ${name} not found') } } } return error("cann't find sheet:'${name}' in global sheets") diff --git a/crystallib/biz/spreadsheet/wiki.v b/crystallib/biz/spreadsheet/wiki.v index e3bbc8052..e273b65f2 100644 --- a/crystallib/biz/spreadsheet/wiki.v +++ b/crystallib/biz/spreadsheet/wiki.v @@ -7,7 +7,7 @@ import freeflowuniverse.crystallib.ui.console pub fn (mut s Sheet) wiki(args_ RowGetArgs) !string { mut args := args_ - period_months := match args.period_type { + _ := match args.period_type { .year { 12 } .month { 1 } .quarter { 3 } diff --git a/crystallib/builder/builder_factory.v b/crystallib/builder/builder_factory.v index c5d177477..5b92cceef 100644 --- a/crystallib/builder/builder_factory.v +++ b/crystallib/builder/builder_factory.v @@ -7,7 +7,7 @@ pub struct BuilderFactory { } pub fn new() !BuilderFactory { - mut c := base.context()! + _ := base.context()! mut bf := BuilderFactory{} return bf } diff --git a/crystallib/core/generator/generic/generator.v b/crystallib/core/generator/generic/generator.v index 7fac495e1..3ece412fd 100644 --- a/crystallib/core/generator/generic/generator.v +++ b/crystallib/core/generator/generic/generator.v @@ -35,7 +35,6 @@ fn generate_exec(path string, reset bool) ! { // TODO: check case sensistivity for delete mut path_readme := pathlib.get(args.path + '/readme.md') if args.reset || !path_readme.exists() { - name := args.name mut templ_readme := $tmpl('templates/readme.md') pathlib.template_write(templ_readme, '${args.path}/readme.md', true)! } diff --git a/crystallib/core/playcmds/play_core.v b/crystallib/core/playcmds/play_core.v index 701c1defb..bfb6f046e 100644 --- a/crystallib/core/playcmds/play_core.v +++ b/crystallib/core/playcmds/play_core.v @@ -20,16 +20,16 @@ pub fn play_core(mut plbook playbook.PlayBook) ! { if p.exists('coderoot') { panic('implement') - mut coderoot := p.get_path_create('coderoot')! + _ := p.get_path_create('coderoot')! - mut gs := gittools.get()! + _ := gittools.get()! } action.done = true } for mut action in plbook.find(filter: 'session.')! { - mut p := action.params - mut session := plbook.session + _ := action.params + _ := plbook.session //!!session.env_set key:'JWT_SHARED_KEY' val:'...' diff --git a/crystallib/core/playcmds/play_luadns.v b/crystallib/core/playcmds/play_luadns.v index 82216c5b2..434d09001 100644 --- a/crystallib/core/playcmds/play_luadns.v +++ b/crystallib/core/playcmds/play_luadns.v @@ -5,12 +5,12 @@ import freeflowuniverse.crystallib.core.playbook import os pub fn play_luadns(mut plbook playbook.PlayBook) ! { - mut buildroot := '${os.home_dir()}/hero/var/mdbuild' - mut publishroot := '${os.home_dir()}/hero/www/info' - mut coderoot := '' + _ := '${os.home_dir()}/hero/var/mdbuild' + _ := '${os.home_dir()}/hero/www/info' + _ := '' // mut install := false - mut reset := false - mut pull := false + _ := false + _ := false for mut action in plbook.find(filter: 'luadns.set_domain')! { mut p := action.params diff --git a/crystallib/core/playcmds/play_mdbook.v b/crystallib/core/playcmds/play_mdbook.v index a1e0ec84d..1a42c53e9 100644 --- a/crystallib/core/playcmds/play_mdbook.v +++ b/crystallib/core/playcmds/play_mdbook.v @@ -107,7 +107,7 @@ pub fn play_mdbook(mut plbook playbook.PlayBook) ! { printbook := p.get_default_false('printbook') foldlevel := p.get_int_default('foldlevel', 0)! production := p.get_default_false('production') - reset3 := p.get_default_true('reset') + _ := p.get_default_true('reset') collections := p.get_list_default('collections', [])! if summary_url == '' && summary_path == '' { diff --git a/crystallib/data/doctree/process_includes.v b/crystallib/data/doctree/process_includes.v index 9e6aef1be..f411e40e3 100644 --- a/crystallib/data/doctree/process_includes.v +++ b/crystallib/data/doctree/process_includes.v @@ -102,7 +102,7 @@ fn (mut tree Tree) generate_pages_graph() !map[string]map[string]bool { fn (mut tree Tree) collection_page_graph(col &collection.Collection) !map[string]map[string]bool { mut graph := map[string]map[string]bool{} - mut ths := []thread !GraphResponse{} + _ := []thread !GraphResponse{} for _, page in col.pages { resp := tree.generate_page_graph(page, col.name)! for k, v in resp.graph { diff --git a/crystallib/data/doctree/scan.v b/crystallib/data/doctree/scan.v index e1729dae1..26309c3f9 100644 --- a/crystallib/data/doctree/scan.v +++ b/crystallib/data/doctree/scan.v @@ -126,7 +126,7 @@ pub fn (mut tree Tree) scan_concurrent(args_ TreeScannerArgs) ! { ) } - for i, t in threads { + for _, t in threads { new_collection := t.wait() or { return error('Error executing thread: ${err}') } tree.collections[new_collection.name] = &new_collection } diff --git a/crystallib/data/doctree/tree.v b/crystallib/data/doctree/tree.v index cefbf3b0d..47e17b29e 100644 --- a/crystallib/data/doctree/tree.v +++ b/crystallib/data/doctree/tree.v @@ -58,7 +58,7 @@ pub fn new(args_ TreeArgsGet) !&Tree { pub fn tree_get(name string) !&Tree { rlock doctrees { if name in doctrees { - return doctrees[name] + return doctrees[name] or { return error('Doctree ${name} not found') } } } return error("cann't doctree:'${name}'") diff --git a/crystallib/develop/gittools/repository.v b/crystallib/develop/gittools/repository.v index 8b5caf3b0..c95d86684 100644 --- a/crystallib/develop/gittools/repository.v +++ b/crystallib/develop/gittools/repository.v @@ -266,7 +266,7 @@ fn (mut repo GitRepo) set_sshkey(key_name string) ! { } private_key := key.private_key_path()! - cmd := 'git config core.sshcommand "ssh -i ~/.ssh/${private_key.path}"' + _ := 'git config core.sshcommand "ssh -i ~/.ssh/${private_key.path}"' repo.deploysshkey = key_name } diff --git a/crystallib/installers/lang/nodejs/nodejs.v b/crystallib/installers/lang/nodejs/nodejs.v index ed54f56e9..e268b1d1e 100644 --- a/crystallib/installers/lang/nodejs/nodejs.v +++ b/crystallib/installers/lang/nodejs/nodejs.v @@ -12,7 +12,7 @@ pub mut: } pub fn install(args_ InstallArgs) ! { - mut args := args_ + _ := args_ pl := osal.platform() if pl == .arch { osal.package_install('npm')! diff --git a/crystallib/installers/lang/vlang/v-analyzer.v b/crystallib/installers/lang/vlang/v-analyzer.v index 4afc791f9..ad1d06ae9 100644 --- a/crystallib/installers/lang/vlang/v-analyzer.v +++ b/crystallib/installers/lang/vlang/v-analyzer.v @@ -10,7 +10,7 @@ pub fn v_analyzer_install(args_ InstallArgs) ! { mut args := args_ console.print_header('install v-analyzer (reset: ${args.reset})') version := '0.0.4' - pl := osal.platform() + _ := osal.platform() res := os.execute('${osal.profile_path_source_and()} v-analyzer version') if res.exit_code == 0 { r := res.output.split_into_lines().filter(it.trim_space().starts_with('v-analyzer')) diff --git a/crystallib/installers/sysadmintools/garage_s3/configure.v b/crystallib/installers/sysadmintools/garage_s3/configure.v index cef45033f..7c0113b8d 100644 --- a/crystallib/installers/sysadmintools/garage_s3/configure.v +++ b/crystallib/installers/sysadmintools/garage_s3/configure.v @@ -112,7 +112,7 @@ pub fn stop() ! { } fn check(args S3Config) !bool { - cmd := 'garage status' + _ := 'garage status' res := os.execute('garage status') if res.exit_code == 0 { return true diff --git a/crystallib/installers/sysadmintools/grafana/grafana.v b/crystallib/installers/sysadmintools/grafana/grafana.v index e1b67619a..38cbda23f 100644 --- a/crystallib/installers/sysadmintools/grafana/grafana.v +++ b/crystallib/installers/sysadmintools/grafana/grafana.v @@ -56,7 +56,7 @@ pub fn install(args_ InstallArgs) ! { return error('unsuported platform, only linux amd64 for now') } - mut dest := osal.download( + _ := osal.download( url: url minsize_kb: 15000 expand_dir: '/tmp/grafana' diff --git a/crystallib/installers/sysadmintools/prometheus/alertmanager_installer.v b/crystallib/installers/sysadmintools/prometheus/alertmanager_installer.v index 5e24ed751..015dfe7d2 100644 --- a/crystallib/installers/sysadmintools/prometheus/alertmanager_installer.v +++ b/crystallib/installers/sysadmintools/prometheus/alertmanager_installer.v @@ -38,7 +38,7 @@ pub fn install_alertmanager(args_ InstallArgs) ! { return error('unsported platform, only linux amd64 for now') } - mut dest := osal.download( + _ := osal.download( url: url minsize_kb: 28000 expand_dir: '/tmp/prometheus' diff --git a/crystallib/installers/sysadmintools/prometheus/blackbox_exporter.v b/crystallib/installers/sysadmintools/prometheus/blackbox_exporter.v index 9a2fa2458..b2d441448 100644 --- a/crystallib/installers/sysadmintools/prometheus/blackbox_exporter.v +++ b/crystallib/installers/sysadmintools/prometheus/blackbox_exporter.v @@ -38,7 +38,7 @@ pub fn install_blackbox_exporter(args_ InstallArgs) ! { return error('unsuported platform, only linux amd64 for now') } - mut dest := osal.download( + _ := osal.download( url: url minsize_kb: 9000 expand_dir: '/tmp/prometheus' diff --git a/crystallib/installers/sysadmintools/prometheus/node_exporter.v b/crystallib/installers/sysadmintools/prometheus/node_exporter.v index 060441b7d..777b8079a 100644 --- a/crystallib/installers/sysadmintools/prometheus/node_exporter.v +++ b/crystallib/installers/sysadmintools/prometheus/node_exporter.v @@ -38,7 +38,7 @@ pub fn install_node_exporter(args_ InstallArgs) ! { return error('unsuported platform, only linux amd64 for now') } - mut dest := osal.download( + _ := osal.download( url: url minsize_kb: 9000 expand_dir: '/tmp/prometheus' diff --git a/crystallib/installers/sysadmintools/prometheus/prom2json.v b/crystallib/installers/sysadmintools/prometheus/prom2json.v index ec523a295..b5d6689dd 100644 --- a/crystallib/installers/sysadmintools/prometheus/prom2json.v +++ b/crystallib/installers/sysadmintools/prometheus/prom2json.v @@ -29,7 +29,7 @@ pub fn install_prom2json(args_ InstallArgs) ! { return error('unsuported platform, only linux amd64 for now') } - mut dest := osal.download( + _ := osal.download( url: url minsize_kb: 3000 expand_dir: '/tmp/prometheus' diff --git a/crystallib/installers/sysadmintools/prometheus/prometheus_installer.v b/crystallib/installers/sysadmintools/prometheus/prometheus_installer.v index 666ad7092..942d13d4d 100644 --- a/crystallib/installers/sysadmintools/prometheus/prometheus_installer.v +++ b/crystallib/installers/sysadmintools/prometheus/prometheus_installer.v @@ -38,7 +38,7 @@ pub fn install_prometheus(args_ InstallArgs) ! { return error('unsported platform, only linux amd64 for now') } - mut dest := osal.download( + _ := osal.download( url: url minsize_kb: 100000 expand_dir: '/tmp/prometheus' diff --git a/crystallib/installers/sysadmintools/rclone/rclone_actions.v b/crystallib/installers/sysadmintools/rclone/rclone_actions.v index 88142adb1..c3389b84b 100644 --- a/crystallib/installers/sysadmintools/rclone/rclone_actions.v +++ b/crystallib/installers/sysadmintools/rclone/rclone_actions.v @@ -53,11 +53,11 @@ fn install() ! { } fn configure() ! { - mut cfg := get()! + _ := get()! // THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED - mut mycode := $tmpl('templates/rclone.yaml') + _ := $tmpl('templates/rclone.yaml') // mut path := pathlib.get_file(path: cfg.configpath, create: true)! // path.write(mycode)! // console.print_debug(mycode) diff --git a/crystallib/installers/upload.v b/crystallib/installers/upload.v index dbb318609..96787c0b0 100644 --- a/crystallib/installers/upload.v +++ b/crystallib/installers/upload.v @@ -12,6 +12,6 @@ pub mut: } pub fn upload(args_ UploadArgs) ! { - mut args := args_ + //_ := args_ panic('to implement') } diff --git a/crystallib/lang/python/shell.v b/crystallib/lang/python/shell.v index 077e80b11..3a30e44d4 100644 --- a/crystallib/lang/python/shell.v +++ b/crystallib/lang/python/shell.v @@ -4,7 +4,7 @@ import freeflowuniverse.crystallib.osal import freeflowuniverse.crystallib.core.texttools pub fn (py PythonEnv) shell(name_ string) ! { - name := texttools.name_fix(name_) + _ := texttools.name_fix(name_) cmd := ' cd ${py.path.path} source bin/activate diff --git a/crystallib/osal/rsync/rsyncd.v b/crystallib/osal/rsync/rsyncd.v index 43db6b046..79a852c4b 100644 --- a/crystallib/osal/rsync/rsyncd.v +++ b/crystallib/osal/rsync/rsyncd.v @@ -30,7 +30,7 @@ pub fn rsyncd() !RsyncD { // add site to the rsyncd config pub fn (mut self RsyncD) site_add(args_ RsyncSite) ! { - mut args := args_ + _ := args_ // self.sites[args.name]=RsyncSite{name:args.name,} } @@ -48,7 +48,7 @@ pub fn (mut self RsyncD) generate() ! { } fn (mut self RsyncD) reload() ! { - cmd := ' + _ := ' chmod 600 /etc/rsyncd.secrets systemctl enable rsync systemctl start rsync diff --git a/crystallib/threefold/grid/deployer.v b/crystallib/threefold/grid/deployer.v index d388eff16..2050841fe 100644 --- a/crystallib/threefold/grid/deployer.v +++ b/crystallib/threefold/grid/deployer.v @@ -300,7 +300,7 @@ pub fn (mut d Deployer) batch_deploy(name_contracts []string, mut dls map[u32]&m continue } - mut dl := dls[data.node] + mut dl := dls[data.node] or { return error('Node ${data.node} not found in dls map') } dl.contract_id = contract_id threads << spawn d.handle_deploy(data.node, mut dl, hash_map[data.node]) } diff --git a/crystallib/threefold/grid/vm.v b/crystallib/threefold/grid/vm.v index f57d19a16..1414690e0 100644 --- a/crystallib/threefold/grid/vm.v +++ b/crystallib/threefold/grid/vm.v @@ -47,7 +47,7 @@ fn (mut deployer Deployer) vm_deploy(args_ VMSpecs) !VMDeployed { } // deploymentstate_db.set(args.deployment_name,"vm_${args.name}",json.encode(VMDeployed))! - vm := models.VM{ + _ := models.VM{ name: 'vm1' env_vars: { 'SSH_KEY': 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDTwULSsUubOq3VPWL6cdrDvexDmjfznGydFPyaNcn7gAL9lRxwFbCDPMj7MbhNSpxxHV2+/iJPQOTVJu4oc1N7bPP3gBCnF51rPrhTpGCt5pBbTzeyNweanhedkKDsCO2mIEh/92Od5Hg512dX4j7Zw6ipRWYSaepapfyoRnNSriW/s3DH/uewezVtL5EuypMdfNngV/u2KZYWoeiwhrY/yEUykQVUwDysW/xUJNP5o+KSTAvNSJatr3FbuCFuCjBSvageOLHePTeUwu6qjqe+Xs4piF1ByO/6cOJ8bt5Vcx0bAtI8/MPApplUU/JWevsPNApvnA/ntffI+u8DCwgP' diff --git a/crystallib/threefold/grid4/farmingsimulator/factory.v b/crystallib/threefold/grid4/farmingsimulator/factory.v index c1bd4ceff..a523f093e 100644 --- a/crystallib/threefold/grid4/farmingsimulator/factory.v +++ b/crystallib/threefold/grid4/farmingsimulator/factory.v @@ -70,7 +70,7 @@ pub fn new(args_ SimulatorArgs) !Simulator { pub fn simulator_get(name string) !&Simulator { rlock farmingsimulators { if name in farmingsimulators { - return farmingsimulators[name] + return farmingsimulators[name] or { return error('Farming simulator ${name} not found') } } } return error("cann't find tfgrid gridsimulator:'${name}' in global farmingsimulators") diff --git a/crystallib/threefold/grid4/farmingsimulator/model_nodesbatch.v b/crystallib/threefold/grid4/farmingsimulator/model_nodesbatch.v index ec8487b6b..92d43bc4b 100644 --- a/crystallib/threefold/grid4/farmingsimulator/model_nodesbatch.v +++ b/crystallib/threefold/grid4/farmingsimulator/model_nodesbatch.v @@ -30,7 +30,7 @@ fn (mut nb NodesBatch) calc(month int) !NBCalc { power_kwh := nb.node_template.capacity.power * 24 * 30 / 1000 * nb.nrnodes rackspace := nb.node_template.capacity.rackspace * nb.nrnodes - params := ri.simulator.params + _ := ri.simulator.params tokens_farmed := ri.token_farming(nb.node_template, month)! if month < nb.start_month { diff --git a/crystallib/threefold/grid4/farmingsimulator/play.v b/crystallib/threefold/grid4/farmingsimulator/play.v index f4f5d6794..5590aec59 100644 --- a/crystallib/threefold/grid4/farmingsimulator/play.v +++ b/crystallib/threefold/grid4/farmingsimulator/play.v @@ -14,7 +14,7 @@ pub fn play(mut plbook PlayBook) ! { return } - mut name := '' + _ := '' // console.print_header("AAAA") // console.print_debug(plbook) // console.print_header("BBBB") diff --git a/crystallib/threefold/grid4/gridsimulator/factory.v b/crystallib/threefold/grid4/gridsimulator/factory.v index c1efbf1e2..e2768acd5 100644 --- a/crystallib/threefold/grid4/gridsimulator/factory.v +++ b/crystallib/threefold/grid4/gridsimulator/factory.v @@ -72,7 +72,7 @@ pub fn new(args_ SimulatorArgs) !Simulator { pub fn simulator_get(name string) !&Simulator { rlock grid_simulators { if name in grid_simulators { - return grid_simulators[name] + return grid_simulators[name] or { return error('Grid simulator ${name} not found') } } } return error("cann't find tfgrid gridsimulator:'${name}' in global grid_simulators") diff --git a/crystallib/threefold/tfrobot/deploy.v b/crystallib/threefold/tfrobot/deploy.v index b1df1825e..ac778b8ed 100644 --- a/crystallib/threefold/tfrobot/deploy.v +++ b/crystallib/threefold/tfrobot/deploy.v @@ -42,8 +42,8 @@ pub mut: node_group string cpu int = 4 @[required] mem int = 4 @[required] // in GB - public_ip4 bool = false - public_ip6 bool = false + public_ip4 bool + public_ip6 bool ygg_ip bool = true mycelium_ip bool = true flist string @[required] @@ -53,8 +53,6 @@ pub mut: env_vars map[string]string } -// pub struct SSHKey - pub struct DeployResult { pub: ok map[string][]VMOutput diff --git a/crystallib/threefold/tfrobot/vm.v b/crystallib/threefold/tfrobot/vm.v index 94212fa5a..545549c3b 100644 --- a/crystallib/threefold/tfrobot/vm.v +++ b/crystallib/threefold/tfrobot/vm.v @@ -35,7 +35,7 @@ pub mut: // return ssh node (can be used to do actions remotely) // will check all available channels till it can ssh into the node pub fn (vm VMOutput) node(args NodeArgs) !&builder.Node { - mut b := builder.new()! + mut b := builder.new()! start_time := time.now().unix_milli() mut run_time := 0.0 for true { @@ -46,7 +46,7 @@ pub fn (vm VMOutput) node(args NodeArgs) !&builder.Node { return b.node_new( ipaddr: 'root@${vm.public_ip4}' name: '${vm.deployment_name}_${vm.name}' - )! + ) } } if args.ip6 && vm.public_ip6.len > 0 { @@ -56,7 +56,7 @@ pub fn (vm VMOutput) node(args NodeArgs) !&builder.Node { return b.node_new( ipaddr: 'root@[${vm.public_ip6}]' name: '${vm.deployment_name}_${vm.name}' - )! + ) } } if args.planetary && vm.yggdrasil_ip.len > 0 { @@ -66,7 +66,7 @@ pub fn (vm VMOutput) node(args NodeArgs) !&builder.Node { return b.node_new( ipaddr: 'root@[${vm.yggdrasil_ip}]' name: '${vm.deployment_name}_${vm.name}' - )! + ) } } run_time = time.now().unix_milli() @@ -79,7 +79,7 @@ pub fn (vm VMOutput) node(args NodeArgs) !&builder.Node { } pub fn (vm VMOutput) tcpport_addr_get(port int) !string { - mut b := builder.new()! + mut b := builder.new()! start_time := time.now().unix_milli() mut run_time := 0.0 for true { @@ -180,22 +180,18 @@ pub fn (vm VMOutput) tcpport_addr_get(port int) !string { pub fn (vm VMOutput) vscode() ! { r := vm.dagu_addr_get()! cmd3 := "open 'http://[${r.addr}]:8080'" - // http://[302:1d81:cef8:3049:fbe1:69ba:bd8c:52ec]:8080/?folder=/root/Holochain/hello-world - // console.print_debug(cmd3) osal.exec(cmd: cmd3)! } pub fn (vm VMOutput) vscode_holochain() ! { r := vm.dagu_addr_get()! cmd3 := "open 'http://[${r.addr}]:8080/?folder=/root/Holochain/hello-world'" - // console.print_debug(cmd3) osal.exec(cmd: cmd3)! } pub fn (vm VMOutput) vscode_holochain_proxy() ! { r := vm.dagu_addr_get()! cmd3 := "open 'http://[${r.addr}]:8080/proxy/8282/" - // console.print_debug(cmd3) osal.exec(cmd: cmd3)! } diff --git a/crystallib/web/components/calendar.v b/crystallib/web/components/calendar.v index a488302d9..542c86ad8 100644 --- a/crystallib/web/components/calendar.v +++ b/crystallib/web/components/calendar.v @@ -117,7 +117,7 @@ fn (mut self CalendarView) generate_calendar() string { month: self.current_month + 1 day: 0 }) - days_in_month := last_day.day + _ := last_day.day starting_day := int(first_day.day_of_week()) mut calendar_html := '
' diff --git a/crystallib/web/components/feed.v b/crystallib/web/components/feed.v index ff7d9ce7a..9ea8bd3bb 100644 --- a/crystallib/web/components/feed.v +++ b/crystallib/web/components/feed.v @@ -11,7 +11,7 @@ pub: user string typ string @[json: 'type'] // Can be "text", "news", or "image" content string - description string = '' // Only for image posts, optional + description string // Only for image posts, optional } pub fn (feed Feed) html() string { diff --git a/crystallib/web/mdbook/mdbook.v b/crystallib/web/mdbook/mdbook.v index 7dad183d3..aa72a5179 100644 --- a/crystallib/web/mdbook/mdbook.v +++ b/crystallib/web/mdbook/mdbook.v @@ -61,7 +61,7 @@ pub fn (mut books MDBooks[Config]) generate(args_ MDBookArgs) !&MDBook { r.expire('mdbook:${args.name}:build', 3600 * 12)! // expire after 12h r.expire('mdbook:${args.name}:publish', 3600 * 12)! - mut gs := gittools.get()! + _ := gittools.get()! mut src_path := pathlib.get_dir(path: '${args.build_path}/src', create: true)! _ := pathlib.get_dir(path: '${args.build_path}/.edit', create: true)! @@ -69,7 +69,7 @@ pub fn (mut books MDBooks[Config]) generate(args_ MDBookArgs) !&MDBook { for col_path in args.collections { // link collections from col_path to src mut p := pathlib.get_dir(path: col_path)! - mut entries := p.list(dirs_only: true, recursive: false)! + _ := p.list(dirs_only: true, recursive: false)! if _ := collection_set[p.name()] { return error('collection with name ${p.name()} already exists')