diff --git a/.cargo/config.toml b/.cargo/config.toml index c1f73e87d1..0d713af60d 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -15,6 +15,8 @@ rustflags = [ [env] # Required for `dist` to work with linux arm targets: https://github.com/axodotdev/cargo-dist/issues/74#issuecomment-2053680080 CC_aarch64_unknown_linux_musl = "aarch64-linux-gnu-gcc" +# Necessary to let `deno_task_shell` know that our executable is called `pixi` instead of `deno` +DENO_EXECUTABLE_NAME = "pixi" [target.aarch64-unknown-linux-musl] linker = "aarch64-linux-gnu-gcc" diff --git a/Cargo.lock b/Cargo.lock index 75ff03c6d7..6a2108e170 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1577,9 +1577,9 @@ dependencies = [ [[package]] name = "deno_task_shell" -version = "0.20.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2da21d6f1061632e50ee585afa570bcad080b7a42fe7baedf447007c49f848e" +checksum = "00246b9c9ec38a48e4143ca60e578291836cda6ab8eeab668e628cafe6ac7a9c" dependencies = [ "anyhow", "futures", @@ -3466,7 +3466,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] @@ -8821,7 +8821,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 899585174b..3e06d8c73f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ crossbeam-channel = "0.5.14" csv = "1.3.1" ctrlc = "3.4.5" dashmap = "6.1.0" -deno_task_shell = "0.20.3" +deno_task_shell = "0.21.0" dialoguer = "0.11.0" digest = "0.10" dirs = "6.0.0" diff --git a/pixi_docs/Cargo.lock b/pixi_docs/Cargo.lock index d2900a58aa..cab0f1aba4 100644 --- a/pixi_docs/Cargo.lock +++ b/pixi_docs/Cargo.lock @@ -1577,9 +1577,9 @@ dependencies = [ [[package]] name = "deno_task_shell" -version = "0.20.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2da21d6f1061632e50ee585afa570bcad080b7a42fe7baedf447007c49f848e" +checksum = "00246b9c9ec38a48e4143ca60e578291836cda6ab8eeab668e628cafe6ac7a9c" dependencies = [ "anyhow", "futures", diff --git a/tests/data/channels/channels/deno_channel/linux-64/deno-0.1.0-hb0f4dca_0.conda b/tests/data/channels/channels/deno_channel/linux-64/deno-0.1.0-hb0f4dca_0.conda new file mode 100644 index 0000000000..8c1cb74a9a Binary files /dev/null and b/tests/data/channels/channels/deno_channel/linux-64/deno-0.1.0-hb0f4dca_0.conda differ diff --git a/tests/data/channels/channels/deno_channel/linux-64/repodata.json b/tests/data/channels/channels/deno_channel/linux-64/repodata.json new file mode 100644 index 0000000000..45b6053be1 --- /dev/null +++ b/tests/data/channels/channels/deno_channel/linux-64/repodata.json @@ -0,0 +1 @@ +{"info":{"subdir":"linux-64"},"packages":{},"packages.conda":{"deno-0.1.0-hb0f4dca_0.conda":{"arch":"x86_64","build":"hb0f4dca_0","build_number":0,"depends":[],"md5":"0b8e0df380c48280aa2dd07638c5e4da","name":"deno","platform":"linux","sha256":"355d4eb0702bec8c594ead99788d28cf2fd45d1c74232c36d141f673606912a9","size":1153,"subdir":"linux-64","timestamp":1743598985535,"version":"0.1.0"}},"repodata_version":2} diff --git a/tests/data/channels/channels/deno_channel/noarch/repodata.json b/tests/data/channels/channels/deno_channel/noarch/repodata.json new file mode 100644 index 0000000000..8010a6626c --- /dev/null +++ b/tests/data/channels/channels/deno_channel/noarch/repodata.json @@ -0,0 +1 @@ +{"info":{"subdir":"noarch"},"packages":{},"packages.conda":{},"repodata_version":2} diff --git a/tests/data/channels/channels/deno_channel/osx-64/deno-0.1.0-h0dc7051_0.conda b/tests/data/channels/channels/deno_channel/osx-64/deno-0.1.0-h0dc7051_0.conda new file mode 100644 index 0000000000..35adde0b3a Binary files /dev/null and b/tests/data/channels/channels/deno_channel/osx-64/deno-0.1.0-h0dc7051_0.conda differ diff --git a/tests/data/channels/channels/deno_channel/osx-64/repodata.json b/tests/data/channels/channels/deno_channel/osx-64/repodata.json new file mode 100644 index 0000000000..895e9beca2 --- /dev/null +++ b/tests/data/channels/channels/deno_channel/osx-64/repodata.json @@ -0,0 +1 @@ +{"info":{"subdir":"osx-64"},"packages":{},"packages.conda":{"deno-0.1.0-h0dc7051_0.conda":{"arch":"x86_64","build":"h0dc7051_0","build_number":0,"depends":[],"md5":"a7dedac45cc5b964d98811f653b29e09","name":"deno","platform":"osx","sha256":"f0058f53dbbe8b1f68e00dac1d5f137a452344e009286e88814fe2daf750df7a","size":1151,"subdir":"osx-64","timestamp":1743598985623,"version":"0.1.0"}},"repodata_version":2} diff --git a/tests/data/channels/channels/deno_channel/osx-arm64/deno-0.1.0-h60d57d3_0.conda b/tests/data/channels/channels/deno_channel/osx-arm64/deno-0.1.0-h60d57d3_0.conda new file mode 100644 index 0000000000..b6bffe2f5b Binary files /dev/null and b/tests/data/channels/channels/deno_channel/osx-arm64/deno-0.1.0-h60d57d3_0.conda differ diff --git a/tests/data/channels/channels/deno_channel/osx-arm64/repodata.json b/tests/data/channels/channels/deno_channel/osx-arm64/repodata.json new file mode 100644 index 0000000000..305bfb125e --- /dev/null +++ b/tests/data/channels/channels/deno_channel/osx-arm64/repodata.json @@ -0,0 +1 @@ +{"info":{"subdir":"osx-arm64"},"packages":{},"packages.conda":{"deno-0.1.0-h60d57d3_0.conda":{"arch":"arm64","build":"h60d57d3_0","build_number":0,"depends":[],"md5":"d0062f73aca159bbf60e57cde7f48049","name":"deno","platform":"osx","sha256":"3e8a1829a6f9bba59e27c424857288c8ef9704e13bc266ca8d341a77710d4577","size":1153,"subdir":"osx-arm64","timestamp":1743598985578,"version":"0.1.0"}},"repodata_version":2} diff --git a/tests/data/channels/channels/deno_channel/win-64/deno-0.1.0-h9490d1a_0.conda b/tests/data/channels/channels/deno_channel/win-64/deno-0.1.0-h9490d1a_0.conda new file mode 100644 index 0000000000..bac2336e8d Binary files /dev/null and b/tests/data/channels/channels/deno_channel/win-64/deno-0.1.0-h9490d1a_0.conda differ diff --git a/tests/data/channels/channels/deno_channel/win-64/repodata.json b/tests/data/channels/channels/deno_channel/win-64/repodata.json new file mode 100644 index 0000000000..f75c50eef2 --- /dev/null +++ b/tests/data/channels/channels/deno_channel/win-64/repodata.json @@ -0,0 +1 @@ +{"info":{"subdir":"win-64"},"packages":{},"packages.conda":{"deno-0.1.0-h9490d1a_0.conda":{"arch":"x86_64","build":"h9490d1a_0","build_number":0,"depends":[],"md5":"a70cbf9de5c2c14d2087519f5e6cae1f","name":"deno","platform":"win","sha256":"8e572bc4382aab6e4987dc3b1803b565a23c58c17b63ea0843da44eb5faa3015","size":1142,"subdir":"win-64","timestamp":1743598985482,"version":"0.1.0"}},"repodata_version":2} diff --git a/tests/data/channels/mappings.toml b/tests/data/channels/mappings.toml index 46555823bc..6ac5795a41 100644 --- a/tests/data/channels/mappings.toml +++ b/tests/data/channels/mappings.toml @@ -1,4 +1,5 @@ "completions_channel_1.yaml" = "completions_channel_1" +"deno_channel.yaml" = "deno_channel" "dummy_channel_1.yaml" = "dummy_channel_1" "dummy_channel_2.yaml" = "dummy_channel_2" "multiple_versions_channel_1_010.yaml" = "multiple_versions_channel_1" diff --git a/tests/data/channels/recipes/deno_channel.yaml b/tests/data/channels/recipes/deno_channel.yaml new file mode 100644 index 0000000000..2747672576 --- /dev/null +++ b/tests/data/channels/recipes/deno_channel.yaml @@ -0,0 +1,20 @@ +recipe: + name: deno-channel + version: 1.0.0 + +outputs: + - package: + name: deno + version: 0.1.0 + + build: + script: + - mkdir -p $PREFIX/bin + - if: win + then: + - echo "@echo off" > $PREFIX/bin/deno.bat + - echo "echo deno" >> $PREFIX/bin/deno.bat + else: + - echo "#!/usr/bin/env bash" > $PREFIX/bin/deno + - echo "echo deno" >> $PREFIX/bin/deno + - chmod +x $PREFIX/bin/deno diff --git a/tests/integration_python/conftest.py b/tests/integration_python/conftest.py index 07478f6f03..6c2cb0d76b 100644 --- a/tests/integration_python/conftest.py +++ b/tests/integration_python/conftest.py @@ -115,5 +115,10 @@ def post_link_script_channel(channels: Path) -> str: return channels.joinpath("post_link_script_channel").as_uri() +@pytest.fixture +def deno_channel(channels: Path) -> str: + return channels.joinpath("deno_channel").as_uri() + + def doc_pixi_workspaces() -> Path: return Path(__file__).parents[2].joinpath("docs", "source_files", "pixi_workspaces") diff --git a/tests/integration_python/test_run_cli.py b/tests/integration_python/test_run_cli.py index f29383a17a..b92a60b42e 100644 --- a/tests/integration_python/test_run_cli.py +++ b/tests/integration_python/test_run_cli.py @@ -354,6 +354,27 @@ def test_run_help(pixi: Path, tmp_pixi_workspace: Path) -> None: ) +def test_run_deno(pixi: Path, tmp_pixi_workspace: Path, deno_channel: str) -> None: + """Ensure that `pixi run deno` will just be forwarded instead of calling pixi""" + manifest = tmp_pixi_workspace.joinpath("pixi.toml") + toml = f""" + [project] + name = "test" + channels = ["{deno_channel}"] + platforms = ["linux-64", "osx-64", "osx-arm64", "win-64"] + + [dependencies] + deno = "*" + """ + manifest.write_text(toml) + + verify_cli_command( + [pixi, "run", "--manifest-path", manifest, "deno"], + stdout_contains="deno", + stdout_excludes="pixi", + ) + + def test_run_dry_run(pixi: Path, tmp_pixi_workspace: Path) -> None: manifest = tmp_pixi_workspace.joinpath("pixi.toml") toml = f"""