From 1869fdee021780ac5218665e11e6a3f2bee2505d Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Mon, 16 Nov 2026 14:48:32 +0100 Subject: [PATCH] Fix godot_dev_tools lint race, release 0.1.1 lint.sh ran gdlint/gdformat via xargs -P; on a cold cache the processes race in os.makedirs and report a file as unopenable. Run one process per tool. Pin CI Python 3.15.2, chmod Godot. Bump version and README tags to 0.1.1. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01WzxdWXs4gEhEUMr9rgYG9V --- .github/workflows/godot-dev-tools-tests.yml | 3 ++- README.md | 2 +- godot_dev_tools/README.md | 2 +- godot_dev_tools/addons/dev_tools/dev_tools.cfg | 2 +- godot_dev_tools/lint.sh | 7 +++++-- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/godot-dev-tools-tests.yml b/.github/workflows/godot-dev-tools-tests.yml index 1df57bf..9430530 100644 --- a/.github/workflows/godot-dev-tools-tests.yml +++ b/.github/workflows/godot-dev-tools-tests.yml @@ -18,12 +18,13 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 - with: { python-version: "3.x" } + with: { python-version: "3.15.2" } - name: Install Godot run: | curl -fsSL -o godot.zip "https://github.com/godotengine/godot/releases/download/${GODOT_VERSION}-stable/Godot_v${GODOT_VERSION}-stable_linux.x86_64.zip" unzip -q godot.zip + chmod +x "Godot_v${GODOT_VERSION}-stable_linux.x86_64" sudo mv "Godot_v${GODOT_VERSION}-stable_linux.x86_64" /usr/local/bin/godot rm godot.zip diff --git a/README.md b/README.md index 1fca8fc..30c8dcc 100644 --- a/README.md +++ b/README.md @@ -149,6 +149,6 @@ object. Read [`godot_dev_tools/README.md`](godot_dev_tools/README.md). Consume via a shallow fetch of the tag, then mount the addon folder: ``` -git clone --depth 1 --branch godot-dev-tools-v0.1.0 https://github.com/kuhyx/utils +git clone --depth 1 --branch godot-dev-tools-v0.1.1 https://github.com/kuhyx/utils # link or copy godot_dev_tools/addons/dev_tools to res://addons/dev_tools ``` diff --git a/godot_dev_tools/README.md b/godot_dev_tools/README.md index eae5e7d..ea10295 100644 --- a/godot_dev_tools/README.md +++ b/godot_dev_tools/README.md @@ -37,7 +37,7 @@ the tag (shallow), then link or copy `godot_dev_tools/addons/dev_tools` to `res://addons/dev_tools` and gitignore that path: ```bash -git clone --depth 1 --branch godot-dev-tools-v0.1.0 https://github.com/kuhyx/utils "$cache" +git clone --depth 1 --branch godot-dev-tools-v0.1.1 https://github.com/kuhyx/utils "$cache" ln -sfn "$cache/godot_dev_tools/addons/dev_tools" addons/dev_tools # CI: cp -a instead ``` diff --git a/godot_dev_tools/addons/dev_tools/dev_tools.cfg b/godot_dev_tools/addons/dev_tools/dev_tools.cfg index 3774a59..79d2db9 100644 --- a/godot_dev_tools/addons/dev_tools/dev_tools.cfg +++ b/godot_dev_tools/addons/dev_tools/dev_tools.cfg @@ -1,4 +1,4 @@ ; Release of the dev_tools addon. The git tag is godot-dev-tools-v. [addon] -version = "0.1.0" +version = "0.1.1" diff --git a/godot_dev_tools/lint.sh b/godot_dev_tools/lint.sh index b71de1c..2d4a43f 100755 --- a/godot_dev_tools/lint.sh +++ b/godot_dev_tools/lint.sh @@ -20,8 +20,11 @@ main() { } done mapfile -t files < <(find "$HERE/addons/dev_tools" "$HERE/tests" -name '*.gd' -type f | sort) - (cd "$HERE" && printf '%s\0' "${files[@]}" | xargs -0 -n 12 -P 4 gdlint >/dev/null) - printf '%s\0' "${files[@]}" | xargs -0 -n 12 -P 4 gdformat --check >/dev/null 2>&1 || { + # One process per tool, not xargs -P: parallel gdtoolkit processes race to + # create their grammar cache dir (os.makedirs EEXIST) on a cold cache and + # report a file as unopenable. + (cd "$HERE" && gdlint "${files[@]}" >/dev/null) + gdformat --check "${files[@]}" >/dev/null 2>&1 || { gdformat --check "${files[@]}" 2>&1 | grep -v 'left unchanged' >&2 || true exit 1 }