From 6fbdc459205f9ad33c4c5d3428f993ed26175a93 Mon Sep 17 00:00:00 2001 From: Bas van Gijzel Date: Sun, 4 Oct 2026 14:22:55 +0000 Subject: [PATCH 1/5] ci(release): release slang from slang/X.Y.Z tags The repository publishes both slang and solx 0.1.x, so slang releases take their own tag namespace: a bare X.Y.Z tag on main no longer publishes anything, and the tag workflow on main-solc keeps releasing solx. The `latest` release stays on solx 0.1.x, which install-solx, the compile benchmark and the releases mirror read; install-slang finds the newest slang/ release instead. The docs deploy for a slang release moves the site's latest link to Slang. The previous-release lookup falls back to `latest` only when no slang release exists, so a failed API call fails the step instead of building the changelog from the wrong base. --- .github/workflows/deploy-docs.yaml | 4 + .github/workflows/release.yaml | 71 ++++++----- install-slang | 188 +++++++++++++++++++++++++++++ 3 files changed, 235 insertions(+), 28 deletions(-) create mode 100755 install-slang diff --git a/.github/workflows/deploy-docs.yaml b/.github/workflows/deploy-docs.yaml index c340197c2..38deaf01a 100644 --- a/.github/workflows/deploy-docs.yaml +++ b/.github/workflows/deploy-docs.yaml @@ -12,6 +12,10 @@ on: description: "Deploy to GitHub Pages" required: false default: false + version: + type: string + description: "Version of the documentation to deploy" + required: false workflow_dispatch: inputs: version: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0d7f7e07f..7971879d9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,9 +1,10 @@ # Three trigger flows: # -# push tag (X.Y.Z) — Full production release: build, review, publish +# push tag (slang/X.Y.Z) — Full production release: build, review, publish # to GitHub Releases with attestation, deploy docs, # and verify the install script. Requires manual # approval via the solx-release environment. +# The `latest` release stays on solx 0.1.x. # # workflow_dispatch — Nightly / ad-hoc pre-release: same build & review # pipeline, publishes a GitHub pre-release. Individual @@ -56,7 +57,7 @@ on: default: true push: tags: - - "*.*.*" + - "slang/*.*.*" # Zero permissions baseline — each job declares only what it needs. permissions: {} @@ -102,6 +103,7 @@ jobs: outputs: matrix: ${{ steps.prepare-matrix.outputs.matrix }} prerelease-suffix: ${{ steps.prerelease-suffix.outputs.prerelease-suffix }} + version: ${{ steps.version.outputs.version }} steps: - name: Checkout source uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -150,6 +152,11 @@ jobs: TRIMMED="$(printf '%s' "${PRERELEASE_SUFFIX}" | sed -E 's/^[[:space:]]+|[[:space:]]+$//g')" echo "prerelease-suffix=${TRIMMED}" | tee -a "${GITHUB_OUTPUT}" + - name: Extract version from tag + id: version + if: github.ref_type == 'tag' + run: echo "version=${GITHUB_REF_NAME#slang/}" | tee -a "${GITHUB_OUTPUT}" + build: permissions: contents: read @@ -205,11 +212,11 @@ jobs: shell: bash run: echo "BINDGEN_EXTRA_CLANG_ARGS=--target=x86_64-w64-windows-gnu" >> "${GITHUB_ENV}" - - name: Build solx + - name: Build slang uses: ./.github/actions/build-rust with: target: ${{ matrix.target }} - release-suffix: ${{ format('{0}-{1}', matrix.release-suffix, github.ref_type == 'tag' && format('v{0}', github.ref_name) || needs.prepare-matrix.outputs.prerelease-suffix || 'notag') }} + release-suffix: ${{ format('{0}-{1}', matrix.release-suffix, github.ref_type == 'tag' && format('v{0}', needs.prepare-matrix.outputs.version) || needs.prepare-matrix.outputs.prerelease-suffix || 'notag') }} get-previous-release: needs: [label-check] @@ -227,14 +234,17 @@ jobs: persist-credentials: false ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || '' }} - # Gets the tag of the published release marked `latest` - # ignoring all intermediate releases and tags for manual releases - - name: Get latest release tag + # The newest slang release, or for the first one the solx release marked `latest`. + - name: Get previous release tag id: latest_release env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - tag=$(gh release view --json tagName --jq .tagName 2>/dev/null || echo "") + tag=$(gh release list --exclude-drafts --exclude-pre-releases --limit 100 --json tagName,createdAt \ + --jq '[.[] | select(.tagName | startswith("slang/"))] | sort_by(.createdAt) | last | .tagName // ""') + if [ -z "${tag}" ]; then + tag=$(gh release view --json tagName --jq .tagName) + fi echo "tag=${tag}" >> "${GITHUB_OUTPUT}" # ─────────────────────────────────────────────── @@ -253,6 +263,7 @@ jobs: outputs: release_title: ${{ steps.release.outputs.release_title }} version_or_sha: ${{ steps.release.outputs.version_or_sha }} + tag_or_sha: ${{ steps.release.outputs.tag_or_sha }} full_sha: ${{ steps.release.outputs.full_sha }} steps: @@ -275,32 +286,36 @@ jobs: REF_TYPE: ${{ github.ref_type }} EVENT_NAME: ${{ github.event_name }} PRERELEASE_SUFFIX: ${{ needs.prepare-matrix.outputs.prerelease-suffix }} + VERSION: ${{ needs.prepare-matrix.outputs.version }} run: | git config --global --add safe.directory "${GITHUB_WORKSPACE}" if [ "${REF_TYPE}" = 'tag' ]; then - VERSION_OR_SHA="${GITHUB_REF#refs/tags/}" - echo "release_title=${VERSION_OR_SHA}" >> "$GITHUB_OUTPUT" + VERSION_OR_SHA="${VERSION}" + TAG_OR_SHA="${GITHUB_REF_NAME}" + echo "release_title=slang ${VERSION}" >> "$GITHUB_OUTPUT" else VERSION_OR_SHA=$(git rev-parse --short HEAD) + TAG_OR_SHA="${VERSION_OR_SHA}" echo "full_sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" if [ "${EVENT_NAME}" = 'pull_request' ]; then echo "release_title=pr-dry-run-${VERSION_OR_SHA}" >> "$GITHUB_OUTPUT" else - echo "release_title=prerelease-${VERSION_OR_SHA}-${PRERELEASE_SUFFIX}" >> "$GITHUB_OUTPUT" + echo "release_title=slang-prerelease-${VERSION_OR_SHA}-${PRERELEASE_SUFFIX}" >> "$GITHUB_OUTPUT" fi fi echo "version_or_sha=${VERSION_OR_SHA}" >> "$GITHUB_OUTPUT" + echo "tag_or_sha=${TAG_OR_SHA}" >> "$GITHUB_OUTPUT" - name: Check release version if: github.ref_type == 'tag' env: - TAG: ${{ steps.release.outputs.version_or_sha }} + VERSION: ${{ steps.release.outputs.version_or_sha }} run: | CARGO_PACKAGE_VERSION="$(${SFW_PREFIX:-} cargo pkgid --manifest-path solx/Cargo.toml | sed 's/.*[#@]//')" # All versions must be equal - if [ "${CARGO_PACKAGE_VERSION}" != "${TAG}" ]; then - echo "Version mismatch: TAG=${TAG}, CARGO_PACKAGE_VERSION=${CARGO_PACKAGE_VERSION}" - echo "Please update the version in Cargo.toml and tag the commit with the same version." + if [ "${CARGO_PACKAGE_VERSION}" != "${VERSION}" ]; then + echo "Version mismatch: ${GITHUB_REF_NAME} is version ${VERSION}, CARGO_PACKAGE_VERSION=${CARGO_PACKAGE_VERSION}" + echo "Please update the version in Cargo.toml and tag the commit with slang/." exit 1 fi @@ -311,7 +326,7 @@ jobs: || (github.event_name == 'workflow_dispatch' && inputs.release_macos_amd64 && inputs.release_macos_arm64) env: MACOSX_UNIVERSAL_SUFFIX: "macosx" - RELEASE_SUFFIX: ${{ github.ref_type == 'tag' && format('v{0}', github.ref_name) || needs.prepare-matrix.outputs.prerelease-suffix || 'notag' }} + RELEASE_SUFFIX: ${{ github.ref_type == 'tag' && format('v{0}', needs.prepare-matrix.outputs.version) || needs.prepare-matrix.outputs.prerelease-suffix || 'notag' }} run: | OUTDIR="./releases/release-${MACOSX_UNIVERSAL_SUFFIX}-${RELEASE_SUFFIX}/${MACOSX_UNIVERSAL_SUFFIX}-${RELEASE_SUFFIX}" mkdir -p "${OUTDIR}" @@ -433,13 +448,13 @@ jobs: webhook-type: incoming-webhook payload: | { - "text": "solx release — Review requested: ${{ needs.prepare.outputs.release_title }}", + "text": "slang release — Review requested: ${{ needs.prepare.outputs.release_title }}", "blocks": [ { "type": "header", "text": { "type": "plain_text", - "text": "solx release — Review requested" + "text": "slang release — Review requested" } }, { @@ -507,13 +522,13 @@ jobs: webhook-type: incoming-webhook payload: | { - "text": "solx release — Deployment starting: ${{ needs.prepare.outputs.release_title }}", + "text": "slang release — Deployment starting: ${{ needs.prepare.outputs.release_title }}", "blocks": [ { "type": "header", "text": { "type": "plain_text", - "text": "solx release — Deployment starting" + "text": "slang release — Deployment starting" } }, { @@ -617,10 +632,10 @@ jobs: name: ${{ needs.prepare.outputs.release_title }} generate_release_notes: false body: ${{ steps.build_changelog.outputs.changelog }} - tag_name: ${{ needs.prepare.outputs.version_or_sha }} + tag_name: ${{ needs.prepare.outputs.tag_or_sha }} target_commitish: ${{ needs.prepare.outputs.full_sha || github.sha }} prerelease: ${{ github.ref_type != 'tag' }} - make_latest: ${{ github.ref_type == 'tag' }} + make_latest: false files: releases/**/** - name: "DRY-RUN: publish summary" @@ -641,7 +656,7 @@ jobs: echo "Full SHA: ${FULL_SHA}" echo "Is tag release: ${IS_TAG}" echo "Prerelease: ${{ github.ref_type != 'tag' }}" - echo "Make latest: ${{ github.ref_type == 'tag' }}" + echo "Make latest: false" echo "" echo "--- Changelog ---" echo "${CHANGELOG:-'(no changelog — not a tag release)'}" @@ -683,10 +698,11 @@ jobs: deploy-docs: if: github.ref_type == 'tag' - needs: publish + needs: [prepare, publish] uses: ./.github/workflows/deploy-docs.yaml with: deploy: true + version: ${{ format('v{0}', needs.prepare.outputs.version_or_sha) }} permissions: contents: write @@ -713,8 +729,7 @@ jobs: - name: Download and run installation script env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - REF_NAME: ${{ github.ref_name }} run: | - curl -fsSL -o "${RUNNER_TEMP}/install-solx" \ - "https://raw.githubusercontent.com/NomicFoundation/solx/${REF_NAME}/install-solx" - bash "${RUNNER_TEMP}/install-solx" + curl -fsSL -o "${RUNNER_TEMP}/install-slang" \ + "https://raw.githubusercontent.com/NomicFoundation/solx/${GITHUB_SHA}/install-slang" + bash "${RUNNER_TEMP}/install-slang" diff --git a/install-slang b/install-slang new file mode 100755 index 000000000..fb3ae4b59 --- /dev/null +++ b/install-slang @@ -0,0 +1,188 @@ +#!/bin/bash +set -euo pipefail + +cat << "EOF" + ____ _ _ _ _ ____ +/ ___| | | / \ | \ | | / ___| +\___ \ | | / _ \ | \| || | _ + ___) || |___ / ___ \ | |\ || |_| | +|____/ |_____|/_/ \_\|_| \_| \____| + + Installer +EOF + +# Default values +REPO="NomicFoundation/solx" +DEFAULT_INSTALL_DIR="${HOME}/.local/bin" +BINARY_NAME="slang" +VERSION="" + +# Cleanup on exit +TMP_DIR="" +cleanup() { + if [[ -n "${TMP_DIR}" && -d "${TMP_DIR}" ]]; then + rm -rf "${TMP_DIR}" + fi +} +trap cleanup EXIT + +# Parse arguments +while [[ $# -gt 0 ]]; do + case "$1" in + --install-dir=*) + INSTALL_DIR="${1#--install-dir=}" + shift + ;; + --version=*) + VERSION="${1#--version=}" + shift + ;; + -v=*) + VERSION="${1#-v=}" + shift + ;; + *) + echo "Unknown argument: $1" + echo "Usage: install-slang [--install-dir=DIR] [--version=X.Y.Z]" + exit 1 + ;; + esac +done + +# Set default install directory if not specified +INSTALL_DIR="${INSTALL_DIR:-${DEFAULT_INSTALL_DIR}}" + +# Detect OS and architecture +OS=$(uname -s) +ARCH=$(uname -m) + +case "$OS" in + Darwin) + PLATFORM="macosx" + ;; + Linux) + if [[ "${ARCH}" == "x86_64" ]]; then + PLATFORM="linux-amd64-gnu" + elif [[ "${ARCH}" == "aarch64" || "${ARCH}" == "arm64" ]]; then + PLATFORM="linux-arm64-gnu" + else + echo "Unsupported architecture: ${ARCH}" + exit 1 + fi + ;; + *) + echo "Unsupported OS: ${OS}" + exit 1 + ;; +esac + +# Check for curl +if ! command -v curl >/dev/null 2>&1; then + echo "curl is not installed. Please install curl to proceed." + exit 1 +fi + +# Build curl options array +CURL_OPTS=(-s) +if [[ -n "${GITHUB_TOKEN:-}" ]]; then + CURL_OPTS+=(-H "Authorization: token ${GITHUB_TOKEN}") +fi + +# Determine version to install +if [[ -n "${VERSION}" ]]; then + # Use specified version, strip leading 'v' if present + VERSION="${VERSION#v}" + echo "Using specified version: ${VERSION}" +else + # The repository also publishes solx releases, so `releases/latest` can't be used. + # The API lists releases newest first, and only slang releases have `slang/` tags. + echo "Fetching latest slang release..." + RELEASES=$(curl "${CURL_OPTS[@]}" "https://api.github.com/repos/${REPO}/releases?per_page=100") + VERSION=$(echo "${RELEASES}" | grep -o '"tag_name": *"slang/[^"]*"' | head -n 1 | sed 's/.*"slang\/\(.*\)"/\1/' || true) + + if [[ -z "${VERSION}" ]]; then + echo "Failed to get latest slang release." + echo "This may be due to GitHub API rate limiting." + echo "Try setting GITHUB_TOKEN or use --version=X.Y.Z" + exit 1 + fi + + echo "Latest version: ${VERSION}" +fi +TAG="slang/${VERSION}" + +# Construct the download URL +ASSET_NAME="slang-${PLATFORM}-v${VERSION}" +DOWNLOAD_URL="https://github.com/${REPO}/releases/download/${TAG}/${ASSET_NAME}" + +# Download the binary +TMP_DIR=$(mktemp -d) +echo "Downloading slang from ${DOWNLOAD_URL}..." +if ! curl -L --fail "${DOWNLOAD_URL}" -o "${TMP_DIR}/${BINARY_NAME}"; then + echo "Failed to download slang." + echo "Please check that version ${VERSION} exists for platform ${PLATFORM}." + exit 1 +fi + +# Make it executable +chmod +x "${TMP_DIR}/${BINARY_NAME}" + +# Create install directory if needed +if [[ ! -d "${INSTALL_DIR}" ]]; then + echo "Creating installation directory: ${INSTALL_DIR}" + mkdir -p "${INSTALL_DIR}" +fi + +# Move to install directory +if [[ -w "${INSTALL_DIR}" ]]; then + mv "${TMP_DIR}/${BINARY_NAME}" "${INSTALL_DIR}/${BINARY_NAME}" +else + echo "Installing to ${INSTALL_DIR} requires write permissions." + echo "Please check your permissions or run with sudo." + exit 1 +fi + +# Ensure slang is in PATH +if ! command -v "${BINARY_NAME}" >/dev/null 2>&1; then + echo "Adding ${INSTALL_DIR} to PATH..." + + SHELL_NAME=$(basename "${SHELL}") + case "${SHELL_NAME}" in + bash) + PROFILE_FILE="${HOME}/.bashrc" + PATH_LINE="export PATH=\"${INSTALL_DIR}:\$PATH\"" + ;; + zsh) + PROFILE_FILE="${HOME}/.zshrc" + PATH_LINE="export PATH=\"${INSTALL_DIR}:\$PATH\"" + ;; + fish) + PROFILE_FILE="${HOME}/.config/fish/config.fish" + PATH_LINE="fish_add_path ${INSTALL_DIR}" + ;; + *) + PROFILE_FILE="${HOME}/.profile" + PATH_LINE="export PATH=\"${INSTALL_DIR}:\$PATH\"" + ;; + esac + + if [[ -f "${PROFILE_FILE}" ]] && grep -q "${INSTALL_DIR}" "${PROFILE_FILE}" 2>/dev/null; then + echo "${INSTALL_DIR} already in ${PROFILE_FILE}" + else + echo "${PATH_LINE}" >> "${PROFILE_FILE}" + echo "Added ${INSTALL_DIR} to PATH in ${PROFILE_FILE}" + fi + + export PATH="${INSTALL_DIR}:${PATH}" +fi + +# Verify installation +echo "Verifying installation..." +if "${INSTALL_DIR}/${BINARY_NAME}" --version; then + echo "" + echo "slang installed successfully to ${INSTALL_DIR}/${BINARY_NAME}" +else + echo "slang installed but could not run 'slang --version'" + echo "Please check your installation in ${INSTALL_DIR}." + exit 1 +fi From bf6544589194812ff828762c43d869c0f51ae1ad Mon Sep 17 00:00:00 2001 From: Bas van Gijzel Date: Wed, 7 Oct 2026 10:28:33 +0000 Subject: [PATCH 2/5] docs: install slang with install-slang The page said Slang had no release and sent readers to install-solx, and the docs only deploy on a slang/ tag, so the first release would have published that as the site's latest page. --- docs/src/user-guide/01-installation.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/docs/src/user-guide/01-installation.md b/docs/src/user-guide/01-installation.md index 5e23bfcf6..b619db70c 100644 --- a/docs/src/user-guide/01-installation.md +++ b/docs/src/user-guide/01-installation.md @@ -1,7 +1,21 @@ # Installation -**Slang** has no release yet, so for now [build it from source](#building-from-source). -The [installation script](https://raw.githubusercontent.com/NomicFoundation/solx/main/install-solx) and the [releases page](https://github.com/NomicFoundation/solx/releases) still serve **solx** 0.1.x, the compiler **Slang** grew out of. +You can start using **Slang** in the following ways: + +1. Use the installation script. + ```shell + curl -L https://raw.githubusercontent.com/NomicFoundation/solx/main/install-slang | bash + ``` + + The script will download the latest stable release of **Slang** and install it in your `PATH`. + Pass `--version=X.Y.Z` to install a specific release, or `--install-dir=DIR` to install somewhere other than `~/.local/bin`. + > ⚠️ The script requires `curl` to be installed on your system.
+ > This is the recommended way to install **Slang** for MacOS users to bypass gatekeeper checks. + +2. Download [stable releases](https://github.com/NomicFoundation/solx/releases). See [Static Executables](#static-executables). +3. Build **Slang** from sources. See [Building from Source](#building-from-source). + +The same repository also hosts the **solx** 0.1.x releases, the compiler **Slang** grew out of, which [install-solx](https://raw.githubusercontent.com/NomicFoundation/solx/main/install-solx) still installs. @@ -40,7 +54,7 @@ These tools manage compiler input and output on a higher level, and provide addi ## Static Executables -**Slang** binaries will ship on the [releases page of this repository](https://github.com/NomicFoundation/solx/releases), with stable executable names and a changelog for each release. Tools using **Slang** must download the binaries from there and cache them locally. +We ship **Slang** binaries on the [releases page of this repository](https://github.com/NomicFoundation/solx/releases), tagged `slang/X.Y.Z` and named `slang--vX.Y.Z`, with a changelog for each release. Tools using **Slang** must download the binaries from there and cache them locally. > All executables are statically linked and must work on all recent platforms without issues. From 7eb7c9426a1a34aa3ce32f9bbccd0ba8710b585d Mon Sep 17 00:00:00 2001 From: Bas van Gijzel Date: Thu, 8 Oct 2026 10:46:50 +0000 Subject: [PATCH 3/5] fix(release): keep the changelog when a slang release is rerun A rerun after the tag is published found its own release as the newest slang one, so the changelog ran from the tag to itself and replaced the release body with an empty one. --- .github/workflows/release.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7971879d9..eae91da4f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -234,14 +234,15 @@ jobs: persist-credentials: false ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || '' }} - # The newest slang release, or for the first one the solx release marked `latest`. + # The newest slang release other than the one being built, so a rerun keeps its changelog, + # or for the first one the solx release marked `latest`. - name: Get previous release tag id: latest_release env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | tag=$(gh release list --exclude-drafts --exclude-pre-releases --limit 100 --json tagName,createdAt \ - --jq '[.[] | select(.tagName | startswith("slang/"))] | sort_by(.createdAt) | last | .tagName // ""') + --jq '[.[] | select(.tagName | startswith("slang/")) | select(.tagName != $ENV.GITHUB_REF_NAME)] | sort_by(.createdAt) | last | .tagName // ""') if [ -z "${tag}" ]; then tag=$(gh release view --json tagName --jq .tagName) fi From 22a62a94586116bff5c97bfd6e5d95196b778bcc Mon Sep 17 00:00:00 2001 From: Bas van Gijzel Date: Thu, 8 Oct 2026 10:46:50 +0000 Subject: [PATCH 4/5] fix(install): add the install directory to PATH when another binary exists The installers skipped the profile edit whenever any binary of that name was on PATH, so an older build elsewhere kept running. They now check for the directory itself and warn when an earlier PATH entry shadows it. --- install-slang | 9 +++++++-- install-solx | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/install-slang b/install-slang index fb3ae4b59..9a3bc176d 100755 --- a/install-slang +++ b/install-slang @@ -142,8 +142,8 @@ else exit 1 fi -# Ensure slang is in PATH -if ! command -v "${BINARY_NAME}" >/dev/null 2>&1; then +# Ensure the install directory is in PATH +if [[ ":${PATH}:" != *":${INSTALL_DIR}:"* ]]; then echo "Adding ${INSTALL_DIR} to PATH..." SHELL_NAME=$(basename "${SHELL}") @@ -176,6 +176,11 @@ if ! command -v "${BINARY_NAME}" >/dev/null 2>&1; then export PATH="${INSTALL_DIR}:${PATH}" fi +RESOLVED=$(command -v "${BINARY_NAME}") +if [[ "${RESOLVED}" != "${INSTALL_DIR}/${BINARY_NAME}" ]]; then + echo "Warning: 'slang' runs ${RESOLVED}, which comes before ${INSTALL_DIR} in PATH." +fi + # Verify installation echo "Verifying installation..." if "${INSTALL_DIR}/${BINARY_NAME}" --version; then diff --git a/install-solx b/install-solx index 389a05bf5..beb568a3b 100755 --- a/install-solx +++ b/install-solx @@ -142,8 +142,8 @@ else exit 1 fi -# Ensure solx is in PATH -if ! command -v "${BINARY_NAME}" >/dev/null 2>&1; then +# Ensure the install directory is in PATH +if [[ ":${PATH}:" != *":${INSTALL_DIR}:"* ]]; then echo "Adding ${INSTALL_DIR} to PATH..." SHELL_NAME=$(basename "${SHELL}") @@ -176,6 +176,11 @@ if ! command -v "${BINARY_NAME}" >/dev/null 2>&1; then export PATH="${INSTALL_DIR}:${PATH}" fi +RESOLVED=$(command -v "${BINARY_NAME}") +if [[ "${RESOLVED}" != "${INSTALL_DIR}/${BINARY_NAME}" ]]; then + echo "Warning: 'solx' runs ${RESOLVED}, which comes before ${INSTALL_DIR} in PATH." +fi + # Verify installation echo "Verifying installation..." if "${INSTALL_DIR}/${BINARY_NAME}" --version; then From dd1a8d6b4ebcf827fc71ba05b2811cf45d771bc9 Mon Sep 17 00:00:00 2001 From: Bas van Gijzel Date: Thu, 8 Oct 2026 10:46:50 +0000 Subject: [PATCH 5/5] docs: show how to pass installer options through the pipe Options appended after `| bash` go to bash, not the script. --- docs/src/user-guide/01-installation.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/src/user-guide/01-installation.md b/docs/src/user-guide/01-installation.md index b619db70c..54a793aa9 100644 --- a/docs/src/user-guide/01-installation.md +++ b/docs/src/user-guide/01-installation.md @@ -8,7 +8,10 @@ You can start using **Slang** in the following ways: ``` The script will download the latest stable release of **Slang** and install it in your `PATH`. - Pass `--version=X.Y.Z` to install a specific release, or `--install-dir=DIR` to install somewhere other than `~/.local/bin`. + Pass `--version=X.Y.Z` to install a specific release, or `--install-dir=DIR` to install somewhere other than `~/.local/bin`: + ```shell + curl -L https://raw.githubusercontent.com/NomicFoundation/solx/main/install-slang | bash -s -- --version=X.Y.Z + ``` > ⚠️ The script requires `curl` to be installed on your system.
> This is the recommended way to install **Slang** for MacOS users to bypass gatekeeper checks.