Skip to content
Snippets Groups Projects
Commit 074349d8 authored by Florian Forster's avatar Florian Forster Committed by Andrew Newdigate
Browse files

developer-setup.md: Rename `rtx` to `mise`.

parent c0e5082a
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -73,13 +73,13 @@ If it is not running, it is likely that it is not installed, so continue with th
softwareupdate --install-rosetta --agree-to-license
```
 
### Step 3.1: Uninstall `asdf` before installing `rtx`
### Step 3.1: Uninstall `asdf` before installing `mise`
 
The Infrastructure department is currently migrating from `asdf` to `rtx`. See [gitlab-com/runbooks#134](https://gitlab.com/gitlab-com/runbooks/-/issues/134) for details of the migration. Many projects now support both `rtx` and `asdf`, but if you're experiencing errors running `scripts/install-asdf-plugins.sh` on a project, please leave a comment on [gitlab-com/runbooks#134](https://gitlab.com/gitlab-com/runbooks/-/issues/134).
The Infrastructure department is currently migrating from `asdf` to `mise` (formerly known as `rtx`). See [gitlab-com/runbooks#134](https://gitlab.com/gitlab-com/runbooks/-/issues/134) for details of the migration. Many projects now support both `mise` and `asdf`, but if you're experiencing errors running `scripts/install-asdf-plugins.sh` on a project, please leave a comment on [gitlab-com/runbooks#134](https://gitlab.com/gitlab-com/runbooks/-/issues/134).
 
**It is not recommended that you run `asdf` alongside `rtx`.**
**It is not recommended that you run `asdf` alongside `mise`.**
 
Please ensure that you uninstall `asdf` before installing `rtx`.
Please ensure that you uninstall `asdf` before installing `mise`.
 
To uninstall `asdf`, full instructions are available at <https://asdf-vm.com/manage/core.html#uninstall>.
 
Loading
Loading
@@ -97,33 +97,33 @@ $ # open a new terminal before continuing...
 
In addition to removing references to loading asdf in your rc files, you may need to remove compile time environment variables such as LDFLAGS, RUBY_CONFIGURE_OPTS, CPPFLAGS, and PKG_CONFIG_PATH.
 
### Step 3.2: Install `rtx`
### Step 3.2: Install `mise`
 
[`rtx`](https://github.com/jdx/rtx) is a polyglot runtime manager. It is compatible with [`asdf`](https://asdf-vm.com/) and relies on the `asdf` plugin ecosystem, but has some advantages over `asdf` in that it generally requires fewer shims and is faster.
[`mise`](https://github.com/jdx/mise) is a polyglot runtime manager. It is compatible with [`asdf`](https://asdf-vm.com/) and relies on the `asdf` plugin ecosystem, but has some advantages over `asdf` in that it generally requires fewer shims and is faster.
 
 
If you're running on MacOS, the recommended approach is to use Homebrew:
 
```shell
brew install rtx
brew install mise
```
 
Linux users should follow the instructions for their package manager in [the rtx documentation](https://github.com/jdx/rtx#apt).
Linux users should follow the instructions for their package manager in [the mise documentation](https://mise.jdx.dev/getting-started.html#apt).
 
#### Step 3.3: Hook `rtx` into your shell
#### Step 3.3: Hook `mise` into your shell
 
Once you've installed `rtx`, add the following line to your shell. Remember to restart your terminal for the change to take affect.
Once you've installed `mise`, add the following line to your shell. Remember to restart your terminal for the change to take affect.
 
```shell
# Disable the `legacy_version_file` feature for rtx
rtx settings set legacy_version_file false
# Disable the `legacy_version_file` feature for mise
mise settings set legacy_version_file false
 
# bash
echo 'eval "$('$(which rtx)' activate bash)"' >> ~/.bashrc
echo 'eval "$('$(which mise)' activate bash)"' >> ~/.bashrc
# zsh
echo 'eval "$('$(which rtx)' activate zsh)"' >> ~/.zshrc
echo 'eval "$('$(which mise)' activate zsh)"' >> ~/.zshrc
# fish
echo 'rtx activate fish | source' >> ~/.config/fish/config.fish
echo 'mise activate fish | source' >> ~/.config/fish/config.fish
```
 
Did you remember to restart your terminal? Good.
Loading
Loading
@@ -159,7 +159,7 @@ Install all the plugins by running:
./scripts/install-asdf-plugins.sh
```
 
This will install required `asdf`/`rtx` plugins, and install the correct versions of the development tools.
This will install required `asdf`/`mise` plugins, and install the correct versions of the development tools.
 
Note that after pulling changes to the repository, you may sometimes need to re-run `./scripts/install-asdf-plugins.sh` to update your locally installed plugins and tool-versions.
 
Loading
Loading
@@ -180,30 +180,30 @@ To keep `.tool-versions` in sync with `.gitlab-ci.yml`, there is a helper script
```
 
1. Update the version in `.tool-versions`
1. Run `rtx install` to install latest version
1. Run `mise install` to install latest version
1. Run `./scripts/update-asdf-version-variables.sh` to update a refresh of the `.gitlab-ci-asdf-versions.yml` file
1. Commit the changes
1. A CI job (see [`asdf-tool-versions.md`](../asdf-tool-versions.md)) will validate the changes.
 
# Diagnosing `rtx` setup issues
# Diagnosing `mise` setup issues
 
## `asdf`/`rtx` plugins don't return versions as expected
## `asdf`/`mise` plugins don't return versions as expected
 
To avoid installing dependencies, `asdf`/`rtx` plugins often rely on basic Unix text processing utilities like `grep`, `sed` and `awk` to parse JSON. Many rely on the fact that responses from the GitHub API are pretty-printed JSON, not minimised (or machine parsable) JSON. However, the GitHub API will only pretty-print JSON when it detects the User-Agent request header as being `curl`. For other user agents, the response will be minimised for efficiency.
To avoid installing dependencies, `asdf`/`mise` plugins often rely on basic Unix text processing utilities like `grep`, `sed` and `awk` to parse JSON. Many rely on the fact that responses from the GitHub API are pretty-printed JSON, not minimised (or machine parsable) JSON. However, the GitHub API will only pretty-print JSON when it detects the User-Agent request header as being `curl`. For other user agents, the response will be minimised for efficiency.
 
Ensure that you haven't overridden your `curl` user-agent on your workstation.
 
Check your `.curlrc` for the `user-agent` setting. Additionally, running `curl https://api.github.com/orgs/gitlabhq` should return pretty-printed JSON. If the response contains minimised JSON, many `asdf`/`rtx` plugins may not work as expected.
Check your `.curlrc` for the `user-agent` setting. Additionally, running `curl https://api.github.com/orgs/gitlabhq` should return pretty-printed JSON. If the response contains minimised JSON, many `asdf`/`mise` plugins may not work as expected.
 
## `asdf`/`rtx` plugins require other `asdf`/`rtx` plugins
## `asdf`/`mise` plugins require other `asdf`/`mise` plugins
 
If you find that a plugin is failing to install, it sometimes helps to setup a global default. Care has been taken to avoid this situation, but if you're stuck, give it a try:
 
```shell
# If a plugin is complaining that it cannot compile because golang hasn't been configured...
# set the global version of golang the same as the current version
rtx global golang $(rtx current golang)
rtx install
mise global golang $(mise current golang)
mise install
```
 
If this happens, please open an issue in the appropriate tracker, so that a better long-term solution can be applied.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment