Workspace Integration Tool
Wit is a tool for managing workspaces. It is intended as a supplement to (not a replacement for) Git-based workflows. The goal of wit is to enable development in a multiple user and repository environment.
A wit workspace is composed of one or more packages. A package is a git repository. Each package may optionally contain a wit-manifest.json file which defines other packages upon which it depends. Wit resolves this hierarchy of dependencies and generates a flattened directory structure in which each package may exist only once.
When multiple versions of the same package are requested, Wit chooses the latest requested version, making sure the selected version's commit is a descendant of every other requested versions' commits.
The best way to learn wit is to check out the tutorial.
Wake is intended to be as lightweight as possible. It simply requires git and Python version 3.5 or greater.
You can use pip to install:
python3 -m pip install wit-sifiveOr you can simply clone the repo and add it to your PATH, for example:
git clone https://github.com/sifive/wit.git
PATH=$PATH:$PWD/wit
which witIt also includes a Makefile for installing specific versions. The installation flow requires make, rsync, and sed.
make install PREFIX=/path/to/installationThe Makefile will create a directory with the version (it even works for commits between tags) and copy the contents of contents of the local clone excluding the tests and metadata.
See the How To Guides for list of guides for common wit operations.
If you have a matching pair wit-lock.json and wit-workspace.json from another workspace, you can create
a new clean workspace by pointing at the previous workspace via the restore sub-command.
$ wit restore -n <new-workspace-name> -w $OTHER_WS
Dependencies are only specified by the wit-lock.json file, no other dependency resolution is performed.
If you are keeping your wit-lock.json and wit-workspace.json under revision control you can do an in-place
restore
$ git clone http://example.com/my_workspaces
$ cd my_workspaces/project1
$ ls
wit-lock.json wit-workspace.json
$ wit restore
Tab completion can be enabled via source complete.bash. If you want it to persist, see below.
cp complete.bash /etc/bash_completion.d/witInstall autocompletion for bash:
brew install bash-completionAfter running the script, you should see instructions for how to finish installing it.
For example, on macOS 10.14.15, the output is:
==> Caveats
Add the following line to your ~/.bash_profile:
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
So, in the above case, we'd add the following to our ~/.bash_profile:
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"then run:
cp complete.bash /usr/local/etc/bash_completion.d/witmkdir -p ~/.zsh/completion
cp complete.bash ~/.zsh/completion/_witMake sure the following is in your ~/.zshrc:
fpath=(~/.zsh/completion $fpath)
autoload -Uz compinit && compinit -iThen reload your shell:
exec $SHELL -lThis repo also provides a GitHub Action that is available for use in GitHub CI/CD workflows. See actions/wit/README.md for more information.
Please see README-internals for information about development.
See LICENSE.