Skip to content

Commit

Permalink
Invoke the "gel" command instead of "edgedb" (#8130)
Browse files Browse the repository at this point in the history
This silences an annoying warning from the CLI
  • Loading branch information
msullivan authored Dec 17, 2024
1 parent ffdda9e commit d89da8c
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 33 deletions.
5 changes: 3 additions & 2 deletions .github/workflows.src/tests.inc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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/
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/tests-ha.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions .github/workflows/tests-inplace.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 11 additions & 6 deletions .github/workflows/tests-managed-pg.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions .github/workflows/tests-patches.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions .github/workflows/tests-pg-versions.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/tests-pool.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions .github/workflows/tests.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion edb/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
24 changes: 13 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit d89da8c

Please sign in to comment.