Configurations

Configurations can be defined via a TOML file, it should be named as either Comonicon.toml or JuliaComonicon.toml under a Julia project project root directory.

References

Comonicon.Configurations.ApplicationType
Application <: AbstractConfiguration

Application build configurations.

Keywords

  • path: application build path, default is "build".
  • incremental: set to true to build incrementally, default is true.
  • filter_stdlibs: set to true to filter out unused stdlibs, default is false.
  • cpu_target: cpu target to build, default is PackageCompiler.default_app_cpu_target().
  • precompile: precompile configurations, see Precompile, default is Precompile().
source
Comonicon.Configurations.ComoniconType
Comonicon <: AbstractConfiguration

Build configurations for Comonicon. One can set this option via Comonicon.toml under the root path of a Julia project directory and read in using read_configs.

Keywords

  • name: required, the name of CLI file to install.
  • install: installation options, see also Install.
  • sysimg: system image build options, see also SysImg.
  • download: download options, see also Download.
  • application: application build options, see also Application.
source
Comonicon.Configurations.DownloadType
Download <: AbstractConfiguration

Download information.

Keywords

  • host: where are the tarballs hosted, default is "github.com"
  • user: required, user name on the host.
  • repo: required, repo name on the host.
Note

Currently this only supports github, and this is considered experimental.

source
Comonicon.Configurations.InstallType
Install <: AbstractConfiguration

Installation configurations.

Keywords

  • path: installation path.
  • completion: set to true to install shell auto-completion scripts.
  • quiet: print logs or not, default is false.
  • compile: julia compiler option for CLIs if not built as standalone application, default is "min".
  • optimize: julia compiler option for CLIs if not built as standalone application, default is 2.
source
Comonicon.Configurations.PrecompileType
Precompile <: AbstractConfiguration

Precompilation files for PackageCompiler.

Keywords

  • execution_file: precompile execution file.
  • statements_file: precompile statements file.
source
Comonicon.Configurations.SysImgType
SysImg <: AbstractConfiguration

System image build configurations.

Keywords

  • path: system image path to generate into, default is "deps/lib".
  • incremental: set to true to build incrementally, default is true.
  • filter_stdlibs: set to true to filter out unused stdlibs, default is false.
  • cpu_target: cpu target to build, default is PackageCompiler.default_app_cpu_target().
  • precompile: precompile configurations, see Precompile, default is Precompile().
source
Comonicon.Configurations.read_configsMethod
read_configs(comonicon; kwargs...)

Read in Comonicon build options. The argument comonicon can be:

  • a module of a Comonicon CLI project.
  • a path to a Comonicon CLI project that contains either JuliaComonicon.toml or Comonicon.toml.
  • a path to a Comonicon CLI build configuration file named either JuliaComonicon.toml or Comonicon.toml.

In some cases, you might want to change the configuration written in the TOML file temporarily, e.g for writing build tests etc. In this case, you can modify the configuration using corresponding keyword arguments.

keyword arguments of Application and SysImg are the same, thus keys like filter_stdlibs are considered ambiguous in read_configs, but you can specifiy them by specifiy the specific Application or SysImg object, e.g

read_configs(MyCLI; sysimg=SysImg(filter_stdlibs=false))

See also Comonicon, Install, SysImg, Application, Download, Precompile.

source