Enable debugging output for various portions of the application.
See lib/unison-prelude/src/Unison/Debug.hs for the full list of supported flags.
E.g.
# Enable ALL debugging flags (likely quite noisy)
$ UNISON_DEBUG= ucm
# Enable timing debugging, printing how long different actions take.
$ UNISON_DEBUG=timing ucm
# Enable LSP and TIMING debugging
$ UNISON_DEBUG=lsp,timing ucmAllows selecting which pager to use for long command outputs.
Defaults to less on Linux & Mac, more on Windows
E.g.
# User more instead of less
$ UNISON_PAGER=more ucmAllows selecting the port to run the LSP server on. Defaults to 5757.
E.g.
$ UNISON_LSP_PORT=8080 ucmAllows explicitly enabling or disabling the LSP server. Acceptable values are 'true' or 'false'
Note for Windows users: Due to an outstanding issue with GHC's IO manager on Windows, the LSP is disabled by default on Windows machines. Enabling the LSP on windows can cause UCM to hang on exit and may require the process to be killed by the operating system or via Ctrl-C. Note that this doesn't pose any risk of codebase corruption or cause any known issues, it's simply an annoyance.
If you accept this annoyance, you can enable the LSP server on Windows by exporting the UNISON_LSP_ENABLED=true environment variable.
You can set this persistently in powershell using:
[System.Environment]::SetEnvironmentVariable('UNISON_LSP_ENABLED','true')See this issue for more details.
E.g.
$ UNISON_LSP_ENABLED=true ucmAllows selecting the location for the default Share server.
E.g.
$ UNISON_SHARE_HOST="http://localhost:5424" ucmAllows overriding the credentials used when authenticating with the Share server.
E.g.
$ UNISON_SHARE_ACCESS_TOKEN="my.token.string" ucmForce unison to use readonly connections to codebases.
$ UNISON_READONLY="true" ucmAllows disabling validation of entities pulled from a codebase server. It's generally a good idea to leave this enabled unless you know exactly what you're doing.
Defaults to enabled.
$ UNISON_ENTITY_VALIDATION="false" ucmAllows regressing to sync version 1 when interacting with Share.
$ UNISON_SYNC_VERSION="1" ucmToggles on/off syncing of history comments with Share.
Defaults to disabled.
$ UNISON_SYNC_VERSION="true" ucmSetting:
$ UNISON_MIGRATION="auto" ucmwill cause ucm to automatically migrate the codebase to the latest version, without prompting for confirmation.
Allows configuring which binary to use when triggering fuzzy searches using fzf.
If unset, we default to searching for a binary named fzf in your $PATH.
E.g.
$ UNISON_FZF_PATH="/opt/homebrew/bin/fzf" ucmIf you wish to disable fzf entirely, you can set UNISON_FZF_PATH to "NONE".
$ UNISON_FZF_PATH="NONE" ucmAllows setting the number of workers to use when pulling from a codebase server. Defaults to 5.
$ UNISON_PULL_WORKERS=6 ucmAllows setting the number of workers to use when pushing to a codebase server. Defaults to 1.
$ UNISON_PULL_WORKERS=2 ucmAllows setting the chunk size used in requests when syncing a codebase. Defaults to 50.
$ UNISON_SYNC_CHUNK_SIZE=100 ucmThe port, host and token to be used for the local codebase server can all be configured by providing environment
variables when starting ucm, using UCM_PORT, UCM_HOST, and UCM_TOKEN.
E.g.
UCM_PORT=8080 UCM_HOST=localhost UCM_TOKEN=1234 ucmAlso, see the guide here
The following configuration options can be provided within the .unisonConfig file,
which exists within the codebase directory, or at ~/.unisonConfig for your default codebase.
# Attach myself as author and use BSD license for all of my contributions
DefaultMetadata = [ ".metadata.authors.chrispenner"
, ".metadata.licenses.chrispenner" ]
# RemoteMapping allows mapping a path in the codebase to a specific location on share.
# Here I state that I want my .share namespace to push to .chrispenner.public
# Everything inside .share will be mapped accordingly, e.g. .share.foo will map to
# chrispenner.public.foo on share.
RemoteMapping {
share = "chrispenner.public"
}