Skip to content

Visual Studio Code, rebuilt in Rust

Rust

build(port): check licenses against gpui-fast on every platform

rokartur849352f7b609
diff --git a/port/tools/check-licenses b/port/tools/check-licenses
index 70768f6c82d..5ae57e928c9 100755
--- a/port/tools/check-licenses
+++ b/port/tools/check-licenses
@@ -1,9 +1,8 @@
#!/usr/bin/env bash
-# Fails when the native workspace pulls a GPL crate (Wu's editor, rope, text, workspace, ... are GPL; its gpui family is Apache-2.0).
+# Fails when the native workspace pulls a GPL crate (gpui-fast's gpui family is Apache-2.0, on every platform).
set -euo pipefail
cd "$(dirname "$0")/../../native"
-# Only the macOS graph ships; gpui_linux and gpui_windows pull Wu's GPL i18n crate on their own targets.
-metadata=$(cargo metadata --format-version 1 --locked --all-features --filter-platform aarch64-apple-darwin)
+metadata=$(cargo metadata --format-version 1 --locked --all-features)
# A dual license with a permissive choice ("Apache-2.0 OR GPL-2.0-only") is fine.
offenders=$(jq -r '.packages[] | select((.license // "") | test("GPL") and (test("MIT|Apache-2.0|BSD") | not)) | "\(.name) \(.version) \(.license)"' <<< "$metadata")
if [[ -n "$offenders" ]]; then
@@ -11,5 +10,5 @@ if [[ -n "$offenders" ]]; then
echo "$offenders"
exit 1
fi
-jq -r '.packages[] | select(.source // "" | test("dstrml/wu")) | "\(.name)\t\(.license)"' <<< "$metadata" | sort
+jq -r '.packages[] | select(.source // "" | test("longbridge/gpui-fast")) | "\(.name)\t\(.license)"' <<< "$metadata" | sort
echo "no GPL crates"