languages: Do not expose unnecessary captures from tasks (#19625)

Piotr Osiewicz created

This tackles an issue with us exposing unnecessary env variables in
environment which are not actually needed for tasks themselves (and may
have little utility), yet come into the way of ssh remoting.

/cc @ConradIrwin 

Release Notes:

- N/A

Change summary

Cargo.lock                                    |  2 +-
crates/languages/src/c/runnables.scm          |  2 +-
crates/languages/src/javascript/runnables.scm |  2 +-
crates/languages/src/python/runnables.scm     |  4 ++--
crates/languages/src/rust/runnables.scm       |  6 +++---
crates/languages/src/typescript/runnables.scm |  2 +-
extensions/php/Cargo.toml                     |  2 +-
extensions/php/extension.toml                 |  2 +-
extensions/php/languages/php/runnables.scm    | 10 +++++-----
9 files changed, 16 insertions(+), 16 deletions(-)

Detailed changes

Cargo.lock 🔗

@@ -14841,7 +14841,7 @@ dependencies = [
 
 [[package]]
 name = "zed_php"
-version = "0.2.1"
+version = "0.2.2"
 dependencies = [
  "zed_extension_api 0.1.0",
 ]

crates/languages/src/python/runnables.scm 🔗

@@ -7,7 +7,7 @@
             (attribute (identifier) @_superclass)]
         )
         (#eq? @_superclass "TestCase")
-    ) @python-unittest-class
+    ) @_python-unittest-class
     (#set! tag python-unittest-class)
 )
 
@@ -24,7 +24,7 @@
                 (function_definition
                     name: (identifier) @run @_unittest_method_name
                     (#match? @_unittest_method_name "^test.*")
-                ) @python-unittest-method
+                ) @_python-unittest-method
                 (#set! tag python-unittest-method)
             )
         )

crates/languages/src/rust/runnables.scm 🔗

@@ -3,7 +3,7 @@
     (mod_item
         name: (_) @run
         (#eq? @run "tests")
-    ) @rust-mod-test
+    )
     (#set! tag rust-mod-test)
 )
 
@@ -14,14 +14,14 @@
                 (scoped_identifier (identifier) @_attribute)
                 ])
             (#match? @_attribute "test")
-        ) @start
+        ) @_start
         .
         (attribute_item) *
         .
         (function_item
             name: (_) @run
             body: _
-        ) @end
+        ) @_end
     )
     (#set! tag rust-test)
 )

extensions/php/Cargo.toml 🔗

@@ -1,6 +1,6 @@
 [package]
 name = "zed_php"
-version = "0.2.1"
+version = "0.2.2"
 edition = "2021"
 publish = false
 license = "Apache-2.0"

extensions/php/extension.toml 🔗

@@ -1,7 +1,7 @@
 id = "php"
 name = "PHP"
 description = "PHP support."
-version = "0.2.1"
+version = "0.2.2"
 schema_version = 1
 authors = ["Piotr Osiewicz <piotr@zed.dev>"]
 repository = "https://github.com/zed-industries/zed"

extensions/php/languages/php/runnables.scm 🔗

@@ -16,7 +16,7 @@
                 (#match? @run "^test.*")
             )
         )
-    ) @phpunit-test
+    ) @_phpunit-test
     (#set! tag phpunit-test)
 )
 
@@ -41,7 +41,7 @@
                 (#not-match? @run "^test.*")
             ))
         )
-    ) @phpunit-test
+    ) @_phpunit-test
     (#set! tag phpunit-test)
 )
 
@@ -69,7 +69,7 @@
                 (#not-match? @run "^test.*")
             )
         )
-    ) @phpunit-test
+    ) @_phpunit-test
     (#set! tag phpunit-test)
 )
 
@@ -81,7 +81,7 @@
         (#not-eq? @_modifier "abstract")
         name: (_) @run
         (#match? @run ".*Test$")
-    ) @phpunit-test
+    ) @_phpunit-test
     (#set! tag phpunit-test)
 )
 
@@ -100,6 +100,6 @@
                 ]
             )
         )
-    ) @pest-test
+    ) @_pest-test
     (#set! tag pest-test)
 )