From d89da8c8aef7cc70c155c471d44504a59756d377 Mon Sep 17 00:00:00 2001 From: "Michael J. Sullivan" Date: Mon, 16 Dec 2024 17:46:07 -0800 Subject: [PATCH] Invoke the "gel" command instead of "edgedb" (#8130) This silences an annoying warning from the CLI --- .github/workflows.src/tests.inc.yml | 5 +++-- .github/workflows/tests-ha.yml | 5 +++-- .github/workflows/tests-inplace.yml | 5 +++-- .github/workflows/tests-managed-pg.yml | 17 +++++++++++------ .github/workflows/tests-patches.yml | 5 +++-- .github/workflows/tests-pg-versions.yml | 7 ++++--- .github/workflows/tests-pool.yml | 2 +- .github/workflows/tests.yml | 8 +++++--- edb/cli/__init__.py | 2 +- setup.py | 24 +++++++++++++----------- 10 files changed, 47 insertions(+), 33 deletions(-) diff --git a/.github/workflows.src/tests.inc.yml b/.github/workflows.src/tests.inc.yml index 126c66044cc..63d8e416a71 100644 --- a/.github/workflows.src/tests.inc.yml +++ b/.github/workflows.src/tests.inc.yml @@ -73,7 +73,7 @@ id: cli-cache with: path: build/cli - key: edb-cli-v3-${{ env.EDGEDBCLI_GIT_REV }} + key: edb-cli-v4-${{ env.EDGEDBCLI_GIT_REV }} - name: Handle cached Rust extensions uses: actions/cache@v4 @@ -363,7 +363,7 @@ id: cli-cache with: path: build/cli - key: edb-cli-v3-${{ env.EDGEDBCLI_GIT_REV }} + key: edb-cli-v4-${{ env.EDGEDBCLI_GIT_REV }} - name: Restore cached Rust extensions uses: actions/cache@v4 @@ -437,6 +437,7 @@ - name: Restore cache into the source tree run: | cp -v build/cli/bin/edgedb edb/cli/edgedb + cp -v build/cli/bin/edgedb edb/cli/gel rsync -av ./build/rust_extensions/edb/ ./edb/ rsync -av ./build/extensions/edb/ ./edb/ rsync -av ./build/lib/edb/ ./edb/ diff --git a/.github/workflows/tests-ha.yml b/.github/workflows/tests-ha.yml index 5178c014516..d517c7ab77c 100644 --- a/.github/workflows/tests-ha.yml +++ b/.github/workflows/tests-ha.yml @@ -119,7 +119,7 @@ jobs: id: cli-cache with: path: build/cli - key: edb-cli-v3-${{ env.EDGEDBCLI_GIT_REV }} + key: edb-cli-v4-${{ env.EDGEDBCLI_GIT_REV }} - name: Handle cached Rust extensions uses: actions/cache@v4 @@ -417,7 +417,7 @@ jobs: id: cli-cache with: path: build/cli - key: edb-cli-v3-${{ env.EDGEDBCLI_GIT_REV }} + key: edb-cli-v4-${{ env.EDGEDBCLI_GIT_REV }} - name: Restore cached Rust extensions uses: actions/cache@v4 @@ -491,6 +491,7 @@ jobs: - name: Restore cache into the source tree run: | cp -v build/cli/bin/edgedb edb/cli/edgedb + cp -v build/cli/bin/edgedb edb/cli/gel rsync -av ./build/rust_extensions/edb/ ./edb/ rsync -av ./build/extensions/edb/ ./edb/ rsync -av ./build/lib/edb/ ./edb/ diff --git a/.github/workflows/tests-inplace.yml b/.github/workflows/tests-inplace.yml index 6cc5a61f149..380ba0edb13 100644 --- a/.github/workflows/tests-inplace.yml +++ b/.github/workflows/tests-inplace.yml @@ -104,7 +104,7 @@ jobs: id: cli-cache with: path: build/cli - key: edb-cli-v3-${{ env.EDGEDBCLI_GIT_REV }} + key: edb-cli-v4-${{ env.EDGEDBCLI_GIT_REV }} - name: Handle cached Rust extensions uses: actions/cache@v4 @@ -414,7 +414,7 @@ jobs: id: cli-cache with: path: build/cli - key: edb-cli-v3-${{ env.EDGEDBCLI_GIT_REV }} + key: edb-cli-v4-${{ env.EDGEDBCLI_GIT_REV }} - name: Restore cached Rust extensions uses: actions/cache@v4 @@ -488,6 +488,7 @@ jobs: - name: Restore cache into the source tree run: | cp -v build/cli/bin/edgedb edb/cli/edgedb + cp -v build/cli/bin/edgedb edb/cli/gel rsync -av ./build/rust_extensions/edb/ ./edb/ rsync -av ./build/extensions/edb/ ./edb/ rsync -av ./build/lib/edb/ ./edb/ diff --git a/.github/workflows/tests-managed-pg.yml b/.github/workflows/tests-managed-pg.yml index 5c930923be2..8f15038f718 100644 --- a/.github/workflows/tests-managed-pg.yml +++ b/.github/workflows/tests-managed-pg.yml @@ -104,7 +104,7 @@ jobs: id: cli-cache with: path: build/cli - key: edb-cli-v3-${{ env.EDGEDBCLI_GIT_REV }} + key: edb-cli-v4-${{ env.EDGEDBCLI_GIT_REV }} - name: Handle cached Rust extensions uses: actions/cache@v4 @@ -448,7 +448,7 @@ jobs: id: cli-cache with: path: build/cli - key: edb-cli-v3-${{ env.EDGEDBCLI_GIT_REV }} + key: edb-cli-v4-${{ env.EDGEDBCLI_GIT_REV }} - name: Restore cached Rust extensions uses: actions/cache@v4 @@ -522,6 +522,7 @@ jobs: - name: Restore cache into the source tree run: | cp -v build/cli/bin/edgedb edb/cli/edgedb + cp -v build/cli/bin/edgedb edb/cli/gel rsync -av ./build/rust_extensions/edb/ ./edb/ rsync -av ./build/extensions/edb/ ./edb/ rsync -av ./build/lib/edb/ ./edb/ @@ -690,7 +691,7 @@ jobs: id: cli-cache with: path: build/cli - key: edb-cli-v3-${{ env.EDGEDBCLI_GIT_REV }} + key: edb-cli-v4-${{ env.EDGEDBCLI_GIT_REV }} - name: Restore cached Rust extensions uses: actions/cache@v4 @@ -764,6 +765,7 @@ jobs: - name: Restore cache into the source tree run: | cp -v build/cli/bin/edgedb edb/cli/edgedb + cp -v build/cli/bin/edgedb edb/cli/gel rsync -av ./build/rust_extensions/edb/ ./edb/ rsync -av ./build/extensions/edb/ ./edb/ rsync -av ./build/lib/edb/ ./edb/ @@ -980,7 +982,7 @@ jobs: id: cli-cache with: path: build/cli - key: edb-cli-v3-${{ env.EDGEDBCLI_GIT_REV }} + key: edb-cli-v4-${{ env.EDGEDBCLI_GIT_REV }} - name: Restore cached Rust extensions uses: actions/cache@v4 @@ -1054,6 +1056,7 @@ jobs: - name: Restore cache into the source tree run: | cp -v build/cli/bin/edgedb edb/cli/edgedb + cp -v build/cli/bin/edgedb edb/cli/gel rsync -av ./build/rust_extensions/edb/ ./edb/ rsync -av ./build/extensions/edb/ ./edb/ rsync -av ./build/lib/edb/ ./edb/ @@ -1236,7 +1239,7 @@ jobs: id: cli-cache with: path: build/cli - key: edb-cli-v3-${{ env.EDGEDBCLI_GIT_REV }} + key: edb-cli-v4-${{ env.EDGEDBCLI_GIT_REV }} - name: Restore cached Rust extensions uses: actions/cache@v4 @@ -1310,6 +1313,7 @@ jobs: - name: Restore cache into the source tree run: | cp -v build/cli/bin/edgedb edb/cli/edgedb + cp -v build/cli/bin/edgedb edb/cli/gel rsync -av ./build/rust_extensions/edb/ ./edb/ rsync -av ./build/extensions/edb/ ./edb/ rsync -av ./build/lib/edb/ ./edb/ @@ -1480,7 +1484,7 @@ jobs: id: cli-cache with: path: build/cli - key: edb-cli-v3-${{ env.EDGEDBCLI_GIT_REV }} + key: edb-cli-v4-${{ env.EDGEDBCLI_GIT_REV }} - name: Restore cached Rust extensions uses: actions/cache@v4 @@ -1554,6 +1558,7 @@ jobs: - name: Restore cache into the source tree run: | cp -v build/cli/bin/edgedb edb/cli/edgedb + cp -v build/cli/bin/edgedb edb/cli/gel rsync -av ./build/rust_extensions/edb/ ./edb/ rsync -av ./build/extensions/edb/ ./edb/ rsync -av ./build/lib/edb/ ./edb/ diff --git a/.github/workflows/tests-patches.yml b/.github/workflows/tests-patches.yml index 9078bb212e9..3c2ba15bcd7 100644 --- a/.github/workflows/tests-patches.yml +++ b/.github/workflows/tests-patches.yml @@ -106,7 +106,7 @@ jobs: id: cli-cache with: path: build/cli - key: edb-cli-v3-${{ env.EDGEDBCLI_GIT_REV }} + key: edb-cli-v4-${{ env.EDGEDBCLI_GIT_REV }} - name: Handle cached Rust extensions uses: actions/cache@v4 @@ -417,7 +417,7 @@ jobs: id: cli-cache with: path: build/cli - key: edb-cli-v3-${{ env.EDGEDBCLI_GIT_REV }} + key: edb-cli-v4-${{ env.EDGEDBCLI_GIT_REV }} - name: Restore cached Rust extensions uses: actions/cache@v4 @@ -491,6 +491,7 @@ jobs: - name: Restore cache into the source tree run: | cp -v build/cli/bin/edgedb edb/cli/edgedb + cp -v build/cli/bin/edgedb edb/cli/gel rsync -av ./build/rust_extensions/edb/ ./edb/ rsync -av ./build/extensions/edb/ ./edb/ rsync -av ./build/lib/edb/ ./edb/ diff --git a/.github/workflows/tests-pg-versions.yml b/.github/workflows/tests-pg-versions.yml index 01739ad03af..b76eb426724 100644 --- a/.github/workflows/tests-pg-versions.yml +++ b/.github/workflows/tests-pg-versions.yml @@ -104,7 +104,7 @@ jobs: id: cli-cache with: path: build/cli - key: edb-cli-v3-${{ env.EDGEDBCLI_GIT_REV }} + key: edb-cli-v4-${{ env.EDGEDBCLI_GIT_REV }} - name: Handle cached Rust extensions uses: actions/cache@v4 @@ -413,7 +413,7 @@ jobs: with: path: ~/.cache/uv key: uv-cache-${{ runner.os }}-py-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('pyproject.toml') }} - + - name: Download requirements.txt uses: actions/cache@v4 with: @@ -446,7 +446,7 @@ jobs: id: cli-cache with: path: build/cli - key: edb-cli-v3-${{ env.EDGEDBCLI_GIT_REV }} + key: edb-cli-v4-${{ env.EDGEDBCLI_GIT_REV }} - name: Restore cached Rust extensions uses: actions/cache@v4 @@ -520,6 +520,7 @@ jobs: - name: Restore cache into the source tree run: | cp -v build/cli/bin/edgedb edb/cli/edgedb + cp -v build/cli/bin/edgedb edb/cli/gel rsync -av ./build/rust_extensions/edb/ ./edb/ rsync -av ./build/extensions/edb/ ./edb/ rsync -av ./build/lib/edb/ ./edb/ diff --git a/.github/workflows/tests-pool.yml b/.github/workflows/tests-pool.yml index 20b58139aef..18f31029fe0 100644 --- a/.github/workflows/tests-pool.yml +++ b/.github/workflows/tests-pool.yml @@ -114,7 +114,7 @@ jobs: id: cli-cache with: path: build/cli - key: edb-cli-v3-${{ env.EDGEDBCLI_GIT_REV }} + key: edb-cli-v4-${{ env.EDGEDBCLI_GIT_REV }} - name: Handle cached Rust extensions uses: actions/cache@v4 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 00a208bb865..2c562113af5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -116,7 +116,7 @@ jobs: id: cli-cache with: path: build/cli - key: edb-cli-v3-${{ env.EDGEDBCLI_GIT_REV }} + key: edb-cli-v4-${{ env.EDGEDBCLI_GIT_REV }} - name: Handle cached Rust extensions uses: actions/cache@v4 @@ -497,7 +497,7 @@ jobs: id: cli-cache with: path: build/cli - key: edb-cli-v3-${{ env.EDGEDBCLI_GIT_REV }} + key: edb-cli-v4-${{ env.EDGEDBCLI_GIT_REV }} - name: Restore cached Rust extensions uses: actions/cache@v4 @@ -571,6 +571,7 @@ jobs: - name: Restore cache into the source tree run: | cp -v build/cli/bin/edgedb edb/cli/edgedb + cp -v build/cli/bin/edgedb edb/cli/gel rsync -av ./build/rust_extensions/edb/ ./edb/ rsync -av ./build/extensions/edb/ ./edb/ rsync -av ./build/lib/edb/ ./edb/ @@ -677,7 +678,7 @@ jobs: id: cli-cache with: path: build/cli - key: edb-cli-v3-${{ env.EDGEDBCLI_GIT_REV }} + key: edb-cli-v4-${{ env.EDGEDBCLI_GIT_REV }} - name: Restore cached Rust extensions uses: actions/cache@v4 @@ -751,6 +752,7 @@ jobs: - name: Restore cache into the source tree run: | cp -v build/cli/bin/edgedb edb/cli/edgedb + cp -v build/cli/bin/edgedb edb/cli/gel rsync -av ./build/rust_extensions/edb/ ./edb/ rsync -av ./build/extensions/edb/ ./edb/ rsync -av ./build/lib/edb/ ./edb/ diff --git a/edb/cli/__init__.py b/edb/cli/__init__.py index f4fc268cd0b..fd72eaa55b1 100644 --- a/edb/cli/__init__.py +++ b/edb/cli/__init__.py @@ -31,4 +31,4 @@ def rustcli(*, args: Optional[List[str]]=None) -> NoReturn: if args is None: args = [*sys.argv] - os.execve(str(thisdir / 'edgedb'), args, os.environ) + os.execve(str(thisdir / 'gel'), args, os.environ) diff --git a/setup.py b/setup.py index 9bad748455f..5532ff45e04 100644 --- a/setup.py +++ b/setup.py @@ -550,18 +550,20 @@ def _compile_cli(build_base, build_temp): check=True, ) - cli_dest = ROOT_PATH / 'edb' / 'cli' / 'edgedb' - # Delete the target first, to avoid "Text file busy" errors during - # the copy if the CLI is currently running. - try: - cli_dest.unlink() - except FileNotFoundError: - pass - shutil.copy( - rust_root / 'bin' / 'edgedb', - cli_dest, - ) + for dest in ('gel', 'edgedb'): + cli_dest = ROOT_PATH / 'edb' / 'cli' / dest + # Delete the target first, to avoid "Text file busy" errors during + # the copy if the CLI is currently running. + try: + cli_dest.unlink() + except FileNotFoundError: + pass + + shutil.copy( + rust_root / 'bin' / 'edgedb', + cli_dest, + ) _PYTHON_ONLY = os.environ.get("BUILD_EXT_MODE", "both") == "skip"