The great Skylark -> Starlark class migration:

Replace all known remaining references*

*Except java_rules_skylark.bzl. This is depended on in third_party/jformatstring (https://github.com/bazelbuild/bazel/blob/a8353612b4791531ae4e2ed463cf0e5d8a4009e8/third_party/jformatstring/BUILD#L17), so breaking the dependency is a bit more complex.

I'm excluding as part of this migration project:

 - "skylark" in URLs. We can't just break URLs. And our docs generation pipeline may bake in assumptions. This would have to be its own docs effort.
 - "skylark-lang", etc. build targets that alandonovan@ is migrating to java.net.starlark.
 - --skylark_* builds flags. Changing these without warning is higher risk since we don't know who uses these flags for what. These should go through their own dedicated migration processes.

PiperOrigin-RevId: 326283275
diff --git a/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/BUILD b/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/BUILD
index e2189d7..1bf1bd7 100644
--- a/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/BUILD
+++ b/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/BUILD
@@ -154,7 +154,7 @@
 #
 
 bootstrap_java_library(
-    name = "skylark-deps",
+    name = "starlark-deps",
     srcs = ["//:bootstrap-derived-java-srcs"],
     jars = [
         "//third_party:auto_value-jars",
@@ -199,7 +199,7 @@
     main_class = "com.google.devtools.build.buildjar.VanillaJavaBuilder",
     tags = ["manual"],
     deps = [
-        ":skylark-deps",
+        ":starlark-deps",
         "//src/java_tools/buildjar/java/com/google/devtools/build/buildjar/jarhelper:bootstrap_jarhelper",
     ],
 )
diff --git a/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/genclass/BUILD b/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/genclass/BUILD
index 118537f..0a6eada 100644
--- a/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/genclass/BUILD
+++ b/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/genclass/BUILD
@@ -41,7 +41,7 @@
     main_class = "com.google.devtools.build.buildjar.genclass.GenClass",
     tags = ["manual"],
     deps = [
-        "//src/java_tools/buildjar/java/com/google/devtools/build/buildjar:skylark-deps",
+        "//src/java_tools/buildjar/java/com/google/devtools/build/buildjar:starlark-deps",
         "//src/java_tools/buildjar/java/com/google/devtools/build/buildjar/jarhelper:bootstrap_jarhelper",
     ],
 )
diff --git a/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/jarhelper/BUILD b/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/jarhelper/BUILD
index c3145b8..3b3ac3b 100644
--- a/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/jarhelper/BUILD
+++ b/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/jarhelper/BUILD
@@ -30,6 +30,6 @@
     ],
     tags = ["manual"],
     deps = [
-        "//src/java_tools/buildjar/java/com/google/devtools/build/buildjar:skylark-deps",
+        "//src/java_tools/buildjar/java/com/google/devtools/build/buildjar:starlark-deps",
     ],
 )
diff --git a/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/plugins/BUILD b/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/plugins/BUILD
index 59131bf..ba50689 100644
--- a/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/plugins/BUILD
+++ b/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/plugins/BUILD
@@ -81,6 +81,6 @@
     deps = [
         "//src/java_tools/buildjar/java/com/google/devtools/build/buildjar:bootstrap_JarOwner",
         "//src/java_tools/buildjar/java/com/google/devtools/build/buildjar:bootstrap_invalid_command_line_exception",
-        "//src/java_tools/buildjar/java/com/google/devtools/build/buildjar:skylark-deps",
+        "//src/java_tools/buildjar/java/com/google/devtools/build/buildjar:starlark-deps",
     ],
 )
diff --git a/src/java_tools/singlejar/java/com/google/devtools/build/singlejar/BUILD b/src/java_tools/singlejar/java/com/google/devtools/build/singlejar/BUILD
index dcd68cc..b634901 100644
--- a/src/java_tools/singlejar/java/com/google/devtools/build/singlejar/BUILD
+++ b/src/java_tools/singlejar/java/com/google/devtools/build/singlejar/BUILD
@@ -74,7 +74,7 @@
 #
 
 bootstrap_java_library(
-    name = "skylark-deps",
+    name = "starlark-deps",
     jars = [
         "//third_party:jsr305-jars",
     ],
@@ -96,7 +96,7 @@
     tags = ["manual"],
     visibility = ["//visibility:public"],
     deps = [
-        ":skylark-deps",
-        "//src/main/java/com/google/devtools/build/lib/shell:shell-skylark",
+        ":starlark-deps",
+        "//src/main/java/com/google/devtools/build/lib/shell:shell-starlark",
     ],
 )
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/README.md b/src/main/java/com/google/devtools/build/lib/rules/objc/README.md
index ca4f216..e3a8f78 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/README.md
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/README.md
@@ -26,7 +26,7 @@
 from BUILD files).  The contents of these configurations can be inspected by
 looking at `rules/objc/ObjcConfiguration.java` and
 `rules/apple/AppleConfiguration.java`.  To access a configuration fragment from
-skylark, the fragment must be declared in the rule definition:
+Starlark, the fragment must be declared in the rule definition:
 
 ```
 def __impl(ctx):
diff --git a/src/main/java/com/google/devtools/build/lib/shell/BUILD b/src/main/java/com/google/devtools/build/lib/shell/BUILD
index 8208a60..fe60ea4 100644
--- a/src/main/java/com/google/devtools/build/lib/shell/BUILD
+++ b/src/main/java/com/google/devtools/build/lib/shell/BUILD
@@ -29,7 +29,7 @@
 load("//tools/build_rules:java_rules_skylark.bzl", "bootstrap_java_library")
 
 bootstrap_java_library(
-    name = "shell-skylark",
+    name = "shell-starlark",
     srcs = glob(
         ["*.java"],
         exclude = ["ExecutionStatistics.java"],
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/StarlarkExecGroupTest.java b/src/test/java/com/google/devtools/build/lib/analysis/StarlarkExecGroupTest.java
index c627395..0eb0c76 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/StarlarkExecGroupTest.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/StarlarkExecGroupTest.java
@@ -33,7 +33,7 @@
 
 /**
  * Test for exec groups. Functionality related to rule context tested in {@link
- * com.google.devtools.build.lib.skylark.StarlarkRuleContextTest}.
+ * com.google.devtools.build.lib.starlark.StarlarkRuleContextTest}.
  */
 @RunWith(JUnit4.class)
 public class StarlarkExecGroupTest extends BuildViewTestCase {
diff --git a/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcStarlarkTest.java b/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcStarlarkTest.java
index 1b0355a..8251a89 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcStarlarkTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcStarlarkTest.java
@@ -1314,7 +1314,7 @@
         .containsExactly(PathFragment.create("path1"));
 
     scratch.file(
-        "examples/objc_skylark2/BUILD",
+        "examples/objc_starlark2/BUILD",
         "objc_library(",
         "   name = 'direct_dep',",
         "   deps = ['//examples/objc_starlark:my_target']",
@@ -1325,13 +1325,13 @@
         ")");
 
     ObjcProvider starlarkProviderDirectDepender =
-        getConfiguredTarget("//examples/objc_skylark2:direct_dep")
+        getConfiguredTarget("//examples/objc_starlark2:direct_dep")
             .get(ObjcProvider.STARLARK_CONSTRUCTOR);
     assertThat(starlarkProviderDirectDepender.include())
         .containsExactly(PathFragment.create("path2"));
 
     ObjcProvider starlarkProviderIndirectDepender =
-        getConfiguredTarget("//examples/objc_skylark2:indirect_dep")
+        getConfiguredTarget("//examples/objc_starlark2:indirect_dep")
             .get(ObjcProvider.STARLARK_CONSTRUCTOR);
     assertThat(starlarkProviderIndirectDepender.include())
         .containsExactly(PathFragment.create("path2"));
@@ -1358,14 +1358,14 @@
         .containsExactly(PathFragment.create("path1"));
 
     scratch.file(
-        "examples/objc_skylark2/BUILD",
+        "examples/objc_starlark2/BUILD",
         "objc_library(",
         "   name = 'direct_dep',",
         "   deps = ['//examples/objc_starlark:my_target']",
         ")");
 
     ObjcProvider starlarkProviderDirectDepender =
-        getConfiguredTarget("//examples/objc_skylark2:direct_dep")
+        getConfiguredTarget("//examples/objc_starlark2:direct_dep")
             .get(ObjcProvider.STARLARK_CONSTRUCTOR);
     assertThat(starlarkProviderDirectDepender.include()).isEmpty();
   }
@@ -1384,14 +1384,14 @@
         .containsExactly(PathFragment.create("path"));
 
     scratch.file(
-        "examples/objc_skylark2/BUILD",
+        "examples/objc_starlark2/BUILD",
         "objc_library(",
         "   name = 'direct_dep',",
         "   deps = ['//examples/objc_starlark:my_target']",
         ")");
 
     ObjcProvider starlarkProviderDirectDepender =
-        getConfiguredTarget("//examples/objc_skylark2:direct_dep")
+        getConfiguredTarget("//examples/objc_starlark2:direct_dep")
             .get(ObjcProvider.STARLARK_CONSTRUCTOR);
     assertThat(starlarkProviderDirectDepender.getStrictDependencyIncludes()).isEmpty();
   }
diff --git a/src/test/java/com/google/devtools/build/lib/syntax/StarlarkInterfaceUtilsTest.java b/src/test/java/com/google/devtools/build/lib/syntax/StarlarkInterfaceUtilsTest.java
index a0b1bae..7d5afa2 100644
--- a/src/test/java/com/google/devtools/build/lib/syntax/StarlarkInterfaceUtilsTest.java
+++ b/src/test/java/com/google/devtools/build/lib/syntax/StarlarkInterfaceUtilsTest.java
@@ -87,7 +87,7 @@
   }
 
   /**
-   * A mock class that implements two unrelated module interfaces. This is invalid as the skylark
+   * A mock class that implements two unrelated module interfaces. This is invalid as the Starlark
    * type of such an object is ambiguous.
    */
   public static class ImplementsTwoUnrelatedInterfaceModules
diff --git a/src/test/py/bazel/action_temp_test.py b/src/test/py/bazel/action_temp_test.py
index d72f236..8eb3f57 100644
--- a/src/test/py/bazel/action_temp_test.py
+++ b/src/test/py/bazel/action_temp_test.py
@@ -94,7 +94,7 @@
     self.assertEqual(len(outputs), 2)
     self._AssertOutputFileContents(outputs['genrule'], input_file_contents,
                                    expected_tmpdir_regex)
-    self._AssertOutputFileContents(outputs['skylark'], input_file_contents,
+    self._AssertOutputFileContents(outputs['starlark'], input_file_contents,
                                    expected_tmpdir_regex)
 
   def _UpdateInputFile(self, content):
@@ -189,7 +189,7 @@
         ')',
         '',
         'foorule(',
-        '    name = "skylark",',
+        '    name = "starlark",',
         '    src = "input.txt",',
         '    tool = "%s",' % toolname,
         ')',
@@ -224,16 +224,16 @@
         '--verbose_failures',
         '--spawn_strategy=%s' % strategy,
         '//foo:genrule',
-        '//foo:skylark',
+        '//foo:starlark',
     ], env_remove, env_add)
     self.AssertExitCode(exit_code, 0, stderr)
     self.assertTrue(
         os.path.exists(os.path.join(bazel_genfiles, 'foo/genrule.txt')))
-    self.assertTrue(os.path.exists(os.path.join(bazel_bin, 'foo/skylark.txt')))
+    self.assertTrue(os.path.exists(os.path.join(bazel_bin, 'foo/starlark.txt')))
 
     return {
         'genrule': _ReadFile(os.path.join(bazel_genfiles, 'foo/genrule.txt')),
-        'skylark': _ReadFile(os.path.join(bazel_bin, 'foo/skylark.txt'))
+        'starlark': _ReadFile(os.path.join(bazel_bin, 'foo/starlark.txt'))
     }
 
   def _AssertOutputFileContents(self, lines, input_file_line,
diff --git a/src/test/shell/bazel/bazel_example_test.sh b/src/test/shell/bazel/bazel_example_test.sh
index 401e54a..8f0ed8d 100755
--- a/src/test/shell/bazel/bazel_example_test.sh
+++ b/src/test/shell/bazel/bazel_example_test.sh
@@ -166,8 +166,8 @@
   expect_log "Hello"
 }
 
-function test_java_skylark() {
-  local java_pkg=examples/java-skylark/src/main/java/com/example/myproject
+function test_java_starlark() {
+  local java_pkg=examples/java-starlark/src/main/java/com/example/myproject
   assert_build_output ./bazel-bin/${java_pkg}/libhello-lib.jar ${java_pkg}:hello-lib
   assert_build_output ./bazel-bin/${java_pkg}/hello-data ${java_pkg}:hello-data
   assert_build_output ./bazel-bin/${java_pkg}/hello-world ${java_pkg}:hello-world
@@ -177,9 +177,9 @@
   assert_binary_run_from_subdir "bazel-bin/${java_pkg}/hello-data foo" "Heyo foo"
 }
 
-function test_java_test_skylark() {
-  setup_skylark_javatest_support
-  javatests=examples/java-skylark/src/test/java/com/example/myproject
+function test_java_test_starlark() {
+  setup_starlark_javatest_support
+  javatests=examples/java-starlark/src/test/java/com/example/myproject
   assert_build //${javatests}:pass
   assert_test_ok //${javatests}:pass
   assert_test_fails //${javatests}:fail
diff --git a/src/test/shell/bazel/bazel_execlog_test.sh b/src/test/shell/bazel/bazel_execlog_test.sh
index c72bab9..11412e0 100755
--- a/src/test/shell/bazel/bazel_execlog_test.sh
+++ b/src/test/shell/bazel/bazel_execlog_test.sh
@@ -22,7 +22,7 @@
 
 function test_dir_depends() {
   create_new_workspace
-  cat > skylark.bzl <<'EOF'
+  cat > starlark.bzl <<'EOF'
 def _dir_impl(ctx):
   output_dir = ctx.actions.declare_directory(ctx.attr.outdir)
   ctx.actions.run_shell(
@@ -45,7 +45,7 @@
 )
 EOF
   cat > BUILD <<'EOF'
-load(":skylark.bzl", "gen_dir")
+load(":starlark.bzl", "gen_dir")
 
 gen_dir(
   name = "dir",
@@ -145,7 +145,7 @@
 
 function test_no_output() {
   create_new_workspace
-  cat > skylark.bzl <<'EOF'
+  cat > starlark.bzl <<'EOF'
 def _impl(ctx):
   ctx.actions.write(ctx.outputs.executable, content="echo hello world", is_executable=True)
   return DefaultInfo()
@@ -157,7 +157,7 @@
 EOF
 
   cat > BUILD <<'EOF'
-load(":skylark.bzl", "my_test")
+load(":starlark.bzl", "my_test")
 
 my_test(
   name = "little_test",
diff --git a/src/test/shell/bazel/bazel_java_test.sh b/src/test/shell/bazel/bazel_java_test.sh
index a2fed48..8c4d298 100755
--- a/src/test/shell/bazel/bazel_java_test.sh
+++ b/src/test/shell/bazel/bazel_java_test.sh
@@ -1445,9 +1445,9 @@
   cat > java/com/google/foo/BUILD << EOF
 load(":my_rule.bzl", "my_rule")
 my_rule(
-  name = 'my_skylark_rule',
-  output_jar = 'my_skylark_rule_lib.jar',
-  source_jars = ['my_skylark_rule_src.jar'],
+  name = 'my_starlark_rule',
+  output_jar = 'my_starlark_rule_lib.jar',
+  source_jars = ['my_starlark_rule_src.jar'],
 )
 EOF
 
@@ -1485,7 +1485,7 @@
 )
 EOF
 
-  bazel build java/com/google/foo:my_skylark_rule >& "$TEST_log" || fail "Expected success"
+  bazel build java/com/google/foo:my_starlark_rule >& "$TEST_log" || fail "Expected success"
 }
 
 # This test builds a simple java deploy jar using remote singlejar and ijar
diff --git a/src/test/shell/bazel/bazel_repository_cache_test.sh b/src/test/shell/bazel/bazel_repository_cache_test.sh
index 87056ea..11b9eed 100755
--- a/src/test/shell/bazel/bazel_repository_cache_test.sh
+++ b/src/test/shell/bazel/bazel_repository_cache_test.sh
@@ -51,7 +51,7 @@
 EOF
 }
 
-function setup_skylark_repository() {
+function setup_starlark_repository() {
   # Prepare HTTP server with Python
   local server_dir="${TEST_TMPDIR}/server_dir"
   mkdir -p "${server_dir}"
@@ -321,8 +321,8 @@
   expect_log "Error downloading"
 }
 
-function test_skylark_download_file_exists_in_cache() {
-  setup_skylark_repository
+function test_starlark_download_file_exists_in_cache() {
+  setup_starlark_repository
 
   cat >test.bzl <<EOF
 def _impl(repository_ctx):
@@ -340,8 +340,8 @@
   fi
 }
 
-function test_skylark_download_and_extract_file_exists_in_cache() {
-  setup_skylark_repository
+function test_starlark_download_and_extract_file_exists_in_cache() {
+  setup_starlark_repository
 
   cat >test.bzl <<EOF
 def _impl(repository_ctx):
@@ -359,8 +359,8 @@
   fi
 }
 
-function test_load_cached_value_skylark_download() {
-  setup_skylark_repository
+function test_load_cached_value_starlark_download() {
+  setup_starlark_repository
 
   cat >test.bzl <<EOF
 def _impl(repository_ctx):
@@ -384,8 +384,8 @@
   expect_log "All external dependencies fetched successfully"
 }
 
-function test_skylark_download_fail_without_cache() {
-  setup_skylark_repository
+function test_starlark_download_fail_without_cache() {
+  setup_starlark_repository
 
   cat >test.bzl <<EOF
 def _impl(repository_ctx):
@@ -412,8 +412,8 @@
   expect_log "Error downloading"
 }
 
-function test_load_cached_value_skylark_download_and_extract() {
-  setup_skylark_repository
+function test_load_cached_value_starlark_download_and_extract() {
+  setup_starlark_repository
 
   cat >test.bzl <<EOF
 def _impl(repository_ctx):
@@ -437,8 +437,8 @@
   expect_log "All external dependencies fetched successfully"
 }
 
-function test_skylark_download_and_extract_fail_without_cache() {
-  setup_skylark_repository
+function test_starlark_download_and_extract_fail_without_cache() {
+  setup_starlark_repository
 
   cat >test.bzl <<EOF
 def _impl(repository_ctx):
diff --git a/src/test/shell/bazel/bazel_sandboxing_test.sh b/src/test/shell/bazel/bazel_sandboxing_test.sh
index 0c54aa9..ef84ca9 100755
--- a/src/test/shell/bazel/bazel_sandboxing_test.sh
+++ b/src/test/shell/bazel/bazel_sandboxing_test.sh
@@ -126,18 +126,18 @@
   tags = [ "local" ],
 )
 
-load('//examples/genrule:skylark.bzl', 'skylark_breaks1')
+load('//examples/genrule:starlark.bzl', 'starlark_breaks1')
 
-skylark_breaks1(
-  name = "skylark_breaks1",
+starlark_breaks1(
+  name = "starlark_breaks1",
   input = "a.txt",
-  output = "skylark_breaks1.txt",
+  output = "starlark_breaks1.txt",
 )
 
-skylark_breaks1(
-  name = "skylark_breaks1_works_with_local_tag",
+starlark_breaks1(
+  name = "starlark_breaks1_works_with_local_tag",
   input = "a.txt",
-  output = "skylark_breaks1_works_with_local_tag.txt",
+  output = "starlark_breaks1_works_with_local_tag.txt",
   action_tags = [ "local" ],
 )
 
@@ -174,8 +174,8 @@
 echo "Tools work!"
 EOF
   chmod +x examples/genrule/tool.sh
-  cat << 'EOF' >> examples/genrule/skylark.bzl
-def _skylark_breaks1_impl(ctx):
+  cat << 'EOF' >> examples/genrule/starlark.bzl
+def _starlark_breaks1_impl(ctx):
   print(ctx.outputs.output.path)
   ctx.actions.run_shell(
     inputs = [ ctx.file.input ],
@@ -186,8 +186,8 @@
     execution_requirements = { tag: '' for tag in ctx.attr.action_tags },
   )
 
-skylark_breaks1 = rule(
-  _skylark_breaks1_impl,
+starlark_breaks1 = rule(
+  _starlark_breaks1_impl,
   attrs = {
     "input": attr.label(mandatory=True, allow_single_file=True),
     "output": attr.output(mandatory=True),
@@ -267,10 +267,10 @@
     || fail "Genrule did not produce output: examples/genrule:breaks1_works_with_local_tag"
 }
 
-function test_sandbox_undeclared_deps_skylark() {
-  output_file="${BAZEL_BIN_DIR}/examples/genrule/skylark_breaks1.txt"
-  bazel build examples/genrule:skylark_breaks1 &> $TEST_log \
-    && fail "Non-hermetic genrule succeeded: examples/genrule:skylark_breaks1" || true
+function test_sandbox_undeclared_deps_starlark() {
+  output_file="${BAZEL_BIN_DIR}/examples/genrule/starlark_breaks1.txt"
+  bazel build examples/genrule:starlark_breaks1 &> $TEST_log \
+    && fail "Non-hermetic genrule succeeded: examples/genrule:starlark_breaks1" || true
 
   [ -f "$output_file" ] ||
     fail "Action did not produce output: $output_file"
@@ -283,11 +283,11 @@
     fail "Output did not contain expected error message: $output_file"
 }
 
-function test_sandbox_undeclared_deps_skylark_with_local_tag() {
-  bazel build examples/genrule:skylark_breaks1_works_with_local_tag &> $TEST_log \
-    || fail "Non-hermetic genrule failed even though tags=['local']: examples/genrule:skylark_breaks1_works_with_local_tag"
-  [ -f "${BAZEL_BIN_DIR}/examples/genrule/skylark_breaks1_works_with_local_tag.txt" ] \
-    || fail "Action did not produce output: examples/genrule:skylark_breaks1_works_with_local_tag"
+function test_sandbox_undeclared_deps_starlark_with_local_tag() {
+  bazel build examples/genrule:starlark_breaks1_works_with_local_tag &> $TEST_log \
+    || fail "Non-hermetic genrule failed even though tags=['local']: examples/genrule:starlark_breaks1_works_with_local_tag"
+  [ -f "${BAZEL_BIN_DIR}/examples/genrule/starlark_breaks1_works_with_local_tag.txt" ] \
+    || fail "Action did not produce output: examples/genrule:starlark_breaks1_works_with_local_tag"
 }
 
 function test_sandbox_block_filesystem() {
diff --git a/src/test/shell/bazel/external_starlark_load_test.sh b/src/test/shell/bazel/external_starlark_load_test.sh
index 410268e..42d6d84 100755
--- a/src/test/shell/bazel/external_starlark_load_test.sh
+++ b/src/test/shell/bazel/external_starlark_load_test.sh
@@ -40,7 +40,7 @@
 #     BUILD
 #     macro_def.bzl
 #     external_constants.bzl
-function run_external_skylark_load_test() {
+function run_external_starlark_load_test() {
   load_target_to_test=$1
   expected_test_output=$2
 
@@ -88,31 +88,31 @@
 
 # A label with an explicit external repo reference should be resolved relative
 # to the external repo.
-function test_load_skylark_from_external_repo_with_pkg_relative_label_load() {
-  run_external_skylark_load_test \
+function test_load_starlark_from_external_repo_with_pkg_relative_label_load() {
+  run_external_starlark_load_test \
     "@external_repo//external_pkg:external_constants.bzl" "EXTERNAL!"
 }
 
 # A relative label should be resolved relative to the external package.
-function test_load_skylark_from_external_repo_with_pkg_relative_label_load() {
-  run_external_skylark_load_test ":external_constants.bzl" "EXTERNAL!"
+function test_load_starlark_from_external_repo_with_pkg_relative_label_load() {
+  run_external_starlark_load_test ":external_constants.bzl" "EXTERNAL!"
 }
 
 # An absolute label with no repo prefix should be resolved relative to the
 # current (external) repo.
-function test_load_skylark_from_external_repo_with_pkg_relative_path_load() {
-  run_external_skylark_load_test "//external_pkg:external_constants.bzl" \
+function test_load_starlark_from_external_repo_with_pkg_relative_path_load() {
+  run_external_starlark_load_test "//external_pkg:external_constants.bzl" \
     "EXTERNAL!"
 }
 
 # An absolute label with the special "@" prefix should cause be resolved
 # relative to the default repo.
-function test_load_skylark_from_external_repo_with_repo_relative_label_load() {
-  run_external_skylark_load_test "@//another_local_pkg:local_constants.bzl" \
+function test_load_starlark_from_external_repo_with_repo_relative_label_load() {
+  run_external_starlark_load_test "@//another_local_pkg:local_constants.bzl" \
     "LOCAL!"
 }
 
-function test_skylark_repository_relative_label() {
+function test_starlark_repository_relative_label() {
   repo2=$TEST_TMPDIR/repo2
   mkdir -p $repo2
   touch $repo2/WORKSPACE $repo2/BUILD
@@ -163,7 +163,7 @@
 # If //foo in local depends on //bar in r1, which is a Starlark rule
 # defined in r2/remote.bzl, then a Label in remote.bzl should either
 # resolve to @r2//whatever or @r1//whatever.
-function test_skylark_repository_nested_relative_label() {
+function test_starlark_repository_nested_relative_label() {
   repo1=$TEST_TMPDIR/repo1
   repo2=$TEST_TMPDIR/repo2
   mkdir -p $repo1 $repo2
@@ -225,7 +225,7 @@
   expect_log "@r1//foo:bar"
 }
 
-function test_aspects_and_skylark_repositories() {
+function test_aspects_and_starlark_repositories() {
 cat > WORKSPACE <<EOF
 bind(name="x1", actual="//:x1")
 load("//:repo.bzl", "repo")
diff --git a/src/test/shell/bazel/maven_starlark_test.sh b/src/test/shell/bazel/maven_starlark_test.sh
index 028c32c..33379df 100755
--- a/src/test/shell/bazel/maven_starlark_test.sh
+++ b/src/test/shell/bazel/maven_starlark_test.sh
@@ -80,7 +80,7 @@
   shutdown_server
 }
 
-function test_maven_jar_skylark() {
+function test_maven_jar_starlark() {
   setup_zoo
   version="1.21"
   serve_artifact com.example.carnivore carnivore $version
@@ -102,7 +102,7 @@
   expect_log "Tra-la!"
 }
 
-function DISABLEDtest_maven_jar_with_classifier_skylark() {
+function DISABLEDtest_maven_jar_with_classifier_starlark() {
   setup_zoo
   version="1.21"
   packaging="jar"
@@ -148,7 +148,7 @@
 EOF
 }
 
-function test_maven_aar_skylark() {
+function test_maven_aar_starlark() {
   setup_android_sdk_support
   if [[ ! -d "${TEST_SRCDIR}/androidsdk" ]]; then
     fail "This test cannot run without android_sdk_repository set up," \
@@ -184,7 +184,7 @@
 }
 
 # Same as test_maven_jar, except omit sha1 implying "we don't care".
-function test_maven_jar_no_sha1_skylark() {
+function test_maven_jar_no_sha1_starlark() {
   setup_zoo
   version="1.22"
   serve_artifact com.example.carnivore carnivore $version
@@ -206,7 +206,7 @@
   expect_log "Tra-la!"
 }
 
-function test_maven_jar_404_skylark() {
+function test_maven_jar_404_starlark() {
   setup_zoo
   version="1.23"
   serve_not_found
@@ -229,7 +229,7 @@
   expect_log "Failed to fetch Maven dependency"
 }
 
-function test_maven_jar_mismatched_sha1_skylark() {
+function test_maven_jar_mismatched_sha1_starlark() {
   setup_zoo
   version="1.24"
   serve_artifact com.example.carnivore carnivore 1.24
@@ -253,7 +253,7 @@
   expect_log "has SHA-1 of $sha1, does not match expected SHA-1 ($wrong_sha1)"
 }
 
-function test_unimplemented_server_attr_skylark() {
+function test_unimplemented_server_attr_starlark() {
   setup_zoo
   version="1.25"
   serve_jar
diff --git a/src/test/shell/bazel/remote/remote_execution_http_test.sh b/src/test/shell/bazel/remote/remote_execution_http_test.sh
index 0725dab..5e95c64 100755
--- a/src/test/shell/bazel/remote/remote_execution_http_test.sh
+++ b/src/test/shell/bazel/remote/remote_execution_http_test.sh
@@ -170,7 +170,7 @@
     expect_log "dir/l is a symbolic link"
 }
 
-function set_directory_artifact_skylark_testfixtures() {
+function set_directory_artifact_starlark_testfixtures() {
   mkdir -p a
   cat > a/rule.bzl <<'EOF'
 def _gen_output_dir_impl(ctx):
@@ -242,8 +242,8 @@
 EOF
 }
 
-function test_directory_artifact_skylark_local() {
-  set_directory_artifact_skylark_testfixtures
+function test_directory_artifact_starlark_local() {
+  set_directory_artifact_starlark_testfixtures
 
   bazel build //a:test >& $TEST_log \
     || fail "Failed to build //a:test without remote execution"
@@ -251,8 +251,8 @@
       || fail "Local execution generated different result"
 }
 
-function test_directory_artifact_skylark() {
-  set_directory_artifact_skylark_testfixtures
+function test_directory_artifact_starlark() {
+  set_directory_artifact_starlark_testfixtures
 
   bazel build \
       --spawn_strategy=remote \
@@ -272,8 +272,8 @@
       || fail "Remote cache hit generated different result"
 }
 
-function test_directory_artifact_skylark_grpc_cache() {
-  set_directory_artifact_skylark_testfixtures
+function test_directory_artifact_starlark_grpc_cache() {
+  set_directory_artifact_starlark_testfixtures
 
   bazel build \
       --remote_cache=grpc://localhost:${worker_port} \
@@ -291,8 +291,8 @@
       || fail "Remote cache hit generated different result"
 }
 
-function test_directory_artifact_skylark_http_cache() {
-  set_directory_artifact_skylark_testfixtures
+function test_directory_artifact_starlark_http_cache() {
+  set_directory_artifact_starlark_testfixtures
 
   bazel build \
       --remote_cache=http://localhost:${http_port} \
@@ -310,8 +310,8 @@
       || fail "Remote cache hit generated different result"
 }
 
-function test_directory_artifact_in_runfiles_skylark_http_cache() {
-  set_directory_artifact_skylark_testfixtures
+function test_directory_artifact_in_runfiles_starlark_http_cache() {
+  set_directory_artifact_starlark_testfixtures
 
   bazel build \
       --remote_cache=http://localhost:${http_port} \
diff --git a/src/test/shell/bazel/remote/remote_execution_test.sh b/src/test/shell/bazel/remote/remote_execution_test.sh
index 9a81ad8..6d68632 100755
--- a/src/test/shell/bazel/remote/remote_execution_test.sh
+++ b/src/test/shell/bazel/remote/remote_execution_test.sh
@@ -854,13 +854,13 @@
 load(":output_directory.bzl", "gen_output_dir", "gen_output_dir_test")
 
 gen_output_dir(
-    name = "skylark_output_dir",
+    name = "starlark_output_dir",
     outdir = "dir",
 )
 
 gen_output_dir_test(
-    name = "skylark_output_dir_test",
-    dir = ":skylark_output_dir",
+    name = "starlark_output_dir_test",
+    dir = ":starlark_output_dir",
 )
 EOF
      cat > a/output_directory.bzl <<'EOF'
@@ -908,14 +908,14 @@
      # a test into the sandboxing module.
      bazel test \
            --spawn_strategy=sandboxed \
-           //a:skylark_output_dir_test \
-           || fail "Failed to run //a:skylark_output_dir_test with sandboxing"
+           //a:starlark_output_dir_test \
+           || fail "Failed to run //a:starlark_output_dir_test with sandboxing"
 
      bazel test \
            --spawn_strategy=remote \
            --remote_executor=grpc://localhost:${worker_port} \
-           //a:skylark_output_dir_test \
-           || fail "Failed to run //a:skylark_output_dir_test with remote execution"
+           //a:starlark_output_dir_test \
+           || fail "Failed to run //a:starlark_output_dir_test with remote execution"
 }
 
 function test_downloads_minimal() {
diff --git a/src/test/shell/bazel/starlark_repository_test.sh b/src/test/shell/bazel/starlark_repository_test.sh
index 0131972..06da53d 100755
--- a/src/test/shell/bazel/starlark_repository_test.sh
+++ b/src/test/shell/bazel/starlark_repository_test.sh
@@ -322,7 +322,7 @@
   expect_log "Failed to load Starlark extension '@does_not_exist//:random.bzl'"
 }
 
-function test_skylark_local_repository() {
+function test_starlark_local_repository() {
   create_new_workspace
   repo2=$new_workspace_dir
   # Remove the WORKSPACE file in the symlinked repo, so our Starlark rule has to
@@ -359,7 +359,7 @@
   expect_log "foo"
 }
 
-function setup_skylark_repository() {
+function setup_starlark_repository() {
   create_new_workspace
   repo2=$new_workspace_dir
 
@@ -375,8 +375,8 @@
   cat > BUILD
 }
 
-function test_skylark_flags_affect_repository_rule() {
-  setup_skylark_repository
+function test_starlark_flags_affect_repository_rule() {
+  setup_starlark_repository
 
   cat >test.bzl <<EOF
 def _impl(repository_ctx):
@@ -405,8 +405,8 @@
       function evaluation"
 }
 
-function test_skylark_repository_which_and_execute() {
-  setup_skylark_repository
+function test_starlark_repository_which_and_execute() {
+  setup_starlark_repository
 
   echo "#!/bin/sh" > bin.sh
   echo "exit 0" >> bin.sh
@@ -440,8 +440,8 @@
   expect_log "version"
 }
 
-function test_skylark_repository_execute_stderr() {
-  setup_skylark_repository
+function test_starlark_repository_execute_stderr() {
+  setup_starlark_repository
 
   cat >test.bzl <<EOF
 def _impl(repository_ctx):
@@ -463,8 +463,8 @@
   expect_log "shhhh"
 }
 
-function test_skylark_repository_execute_env_and_workdir() {
-  setup_skylark_repository
+function test_starlark_repository_execute_env_and_workdir() {
+  setup_starlark_repository
 
   cat >test.bzl <<EOF
 def _impl(repository_ctx):
@@ -488,8 +488,8 @@
   expect_log "PWD=$repo2 TOTO=titi"
 }
 
-function test_skylark_repository_environ() {
-  setup_skylark_repository
+function test_starlark_repository_environ() {
+  setup_starlark_repository
 
   # Our custom repository rule
   cat >test.bzl <<EOF
@@ -558,7 +558,7 @@
   expect_log "BOZ"
 }
 
-function write_environ_skylark() {
+function write_environ_starlark() {
   local execution_file="$1"
   local environ="$2"
 
@@ -587,7 +587,7 @@
 
 function setup_invalidation_test() {
   local startup_flag="${1-}"
-  setup_skylark_repository
+  setup_starlark_repository
 
   # We use a counter to avoid other invalidation to hide repository
   # invalidation (e.g., --action_env will cause all action to re-run).
@@ -599,7 +599,7 @@
   return r_ctx.os.environ[var] if var in r_ctx.os.environ else "undefined"
 EOF
 
-  write_environ_skylark "${execution_file}" '"FOO", "BAR"'
+  write_environ_starlark "${execution_file}" '"FOO", "BAR"'
 
   cat <<EOF >bar.tpl
 FOO=%{FOO} BAR=%{BAR} BAZ=%{BAZ}
@@ -665,7 +665,7 @@
   assert_equals 4 $(cat "${execution_file}")
 
   # Now try to depends on more variables
-  write_environ_skylark "${execution_file}" '"FOO", "BAR", "BAZ"'
+  write_environ_starlark "${execution_file}" '"FOO", "BAR", "BAZ"'
 
   # The Starlark rule has changed, so a rebuild should happen
   FOO=BAZ bazel ${startup_flag} build @foo//:bar >& $TEST_log \
@@ -688,7 +688,7 @@
 
 function environ_invalidation_action_env_test_template() {
   local startup_flag="${1-}"
-  setup_skylark_repository
+  setup_starlark_repository
 
   # We use a counter to avoid other invalidation to hide repository
   # invalidation (e.g., --action_env will cause all action to re-run).
@@ -716,20 +716,20 @@
   assert_equals 2 $(cat "${execution_file}")
 }
 
-function test_skylark_repository_environ_invalidation() {
+function test_starlark_repository_environ_invalidation() {
   environ_invalidation_test_template
 }
 
 # Same test as previous but with server restart between each invocation
-function test_skylark_repository_environ_invalidation_batch() {
+function test_starlark_repository_environ_invalidation_batch() {
   environ_invalidation_test_template --batch
 }
 
-function test_skylark_repository_environ_invalidation_action_env() {
+function test_starlark_repository_environ_invalidation_action_env() {
   environ_invalidation_action_env_test_template
 }
 
-function test_skylark_repository_environ_invalidation_action_env_batch() {
+function test_starlark_repository_environ_invalidation_action_env_batch() {
   environ_invalidation_action_env_test_template --batch
 }
 
@@ -770,12 +770,12 @@
   assert_equals 3 $(cat "${execution_file}")
 }
 
-function test_skylark_repository_bzl_invalidation() {
+function test_starlark_repository_bzl_invalidation() {
   bzl_invalidation_test_template
 }
 
 # Same test as previous but with server restart between each invocation
-function test_skylark_repository_bzl_invalidation_batch() {
+function test_starlark_repository_bzl_invalidation_batch() {
   bzl_invalidation_test_template --batch
 }
 
@@ -804,12 +804,12 @@
   assert_equals 2 $(cat "${execution_file}")
 }
 
-function test_skylark_repository_file_invalidation() {
+function test_starlark_repository_file_invalidation() {
   file_invalidation_test_template
 }
 
 # Same test as previous but with server restart between each invocation
-function test_skylark_repository_file_invalidation_batch() {
+function test_starlark_repository_file_invalidation_batch() {
   file_invalidation_test_template --batch
 }
 
@@ -853,7 +853,7 @@
 
 
 function test_repo_env() {
-  setup_skylark_repository
+  setup_starlark_repository
 
   cat > test.bzl <<'EOF'
 def _impl(ctx):
@@ -977,13 +977,13 @@
     diff time2.txt time3.txt || fail "Expected repo to not be refetched"
 }
 
-function test_skylark_repository_executable_flag() {
+function test_starlark_repository_executable_flag() {
   if "$is_windows"; then
     # There is no executable flag on Windows.
-    echo "Skipping test_skylark_repository_executable_flag on Windows"
+    echo "Skipping test_starlark_repository_executable_flag on Windows"
     return
   fi
-  setup_skylark_repository
+  setup_starlark_repository
 
   # Our custom repository rule
   cat >test.bzl <<EOF
@@ -1004,7 +1004,7 @@
   test ! -x "${output_base}/external/foo/test2" || fail "test2 is executable"
 }
 
-function test_skylark_repository_download() {
+function test_starlark_repository_download() {
   # Prepare HTTP server with Python
   local server_dir="${TEST_TMPDIR}/server_dir"
   mkdir -p "${server_dir}"
@@ -1018,7 +1018,7 @@
   # Start HTTP server with Python
   startup_server "${server_dir}"
 
-  setup_skylark_repository
+  setup_starlark_repository
   # Our custom repository rule
   cat >test.bzl <<EOF
 def _impl(repository_ctx):
@@ -1061,7 +1061,7 @@
     || fail "download_executable_file.sh is not executable"
 }
 
-function test_skylark_repository_context_downloads_return_struct() {
+function test_starlark_repository_context_downloads_return_struct() {
    # Prepare HTTP server with Python
   local server_dir="${TEST_TMPDIR}/server_dir"
   mkdir -p "${server_dir}"
@@ -1090,7 +1090,7 @@
     server_dir="/${server_dir}"
   fi
 
-  setup_skylark_repository
+  setup_starlark_repository
   # Our custom repository rule
   cat >test.bzl <<EOF
 def _impl(repository_ctx):
@@ -1136,7 +1136,7 @@
       || fail "expected compressed calculated sha256 $compressed_not_provided_sha256"
 }
 
-function test_skylark_repository_download_args() {
+function test_starlark_repository_download_args() {
   # Prepare HTTP server with Python
   local server_dir="${TEST_TMPDIR}/server_dir"
   mkdir -p "${server_dir}"
@@ -1197,7 +1197,7 @@
 }
 
 
-function test_skylark_repository_download_and_extract() {
+function test_starlark_repository_download_and_extract() {
   # Prepare HTTP server with Python
   local server_dir="${TEST_TMPDIR}/server_dir"
   mkdir -p "${server_dir}"
@@ -1218,7 +1218,7 @@
   # Start HTTP server with Python
   startup_server "${server_dir}"
 
-  setup_skylark_repository
+  setup_starlark_repository
   # Our custom repository rule
   cat >test.bzl <<EOF
 def _impl(repository_ctx):
@@ -1443,9 +1443,9 @@
   cat <<'EOF' >bar.tpl
 FOO=%{FOO} BAR=%{BAR} BAZ=%{BAZ}
 EOF
-  write_environ_skylark "${TEST_TMPDIR}/executionFOO" ""
+  write_environ_starlark "${TEST_TMPDIR}/executionFOO" ""
   mv test.bzl testfoo.bzl
-  write_environ_skylark "${TEST_TMPDIR}/executionBAR" ""
+  write_environ_starlark "${TEST_TMPDIR}/executionBAR" ""
   mv test.bzl testbar.bzl
   cat > WORKSPACE <<'EOF'
 load("//:testfoo.bzl", foorepo="repo")
diff --git a/src/test/shell/bazel/starlark_rule_test.sh b/src/test/shell/bazel/starlark_rule_test.sh
index d8eb84b..62011a1 100755
--- a/src/test/shell/bazel/starlark_rule_test.sh
+++ b/src/test/shell/bazel/starlark_rule_test.sh
@@ -25,7 +25,7 @@
 function test_basic_output() {
   mkdir -p test
   cat << EOF >> test/BUILD
-load(":skylark.bzl", "test_rule")
+load(":starlark.bzl", "test_rule")
 
 test_rule(
     name = "test",
@@ -33,7 +33,7 @@
 )
 EOF
 
-  cat << 'EOF' >> test/skylark.bzl
+  cat << 'EOF' >> test/starlark.bzl
 def _test_impl(ctx):
   ctx.actions.run_shell(outputs = [ctx.outputs.out],
                         command = ["touch", ctx.outputs.out.path])
@@ -58,7 +58,7 @@
 function test_execution_failure() {
   mkdir -p test
   cat << EOF >> test/BUILD
-load(":skylark.bzl", "test_rule")
+load(":starlark.bzl", "test_rule")
 
 test_rule(
     name = "test",
@@ -66,7 +66,7 @@
 )
 EOF
 
-  cat << 'EOF' >> test/skylark.bzl
+  cat << 'EOF' >> test/starlark.bzl
 def _test_impl(ctx):
   ctx.actions.run_shell(outputs = [ctx.outputs.out],
                         command = ["not_a_command", ctx.outputs.out.path])
diff --git a/src/test/shell/bazel/tags_propagation_starlark_test.sh b/src/test/shell/bazel/tags_propagation_starlark_test.sh
index 0fa8af5..cee8cb9 100755
--- a/src/test/shell/bazel/tags_propagation_starlark_test.sh
+++ b/src/test/shell/bazel/tags_propagation_starlark_test.sh
@@ -27,7 +27,7 @@
 function test_tags_propagated_to_run_shell() {
   mkdir -p test
   cat << EOF >> test/BUILD
-load(":skylark.bzl", "test_rule")
+load(":starlark.bzl", "test_rule")
 
 test_rule(
     name = "test",
@@ -36,7 +36,7 @@
 )
 EOF
 
-  cat << 'EOF' >> test/skylark.bzl
+  cat << 'EOF' >> test/starlark.bzl
 def _test_impl(ctx):
   ctx.actions.run_shell(outputs = [ctx.outputs.out],
                         command = ["touch", ctx.outputs.out.path])
@@ -64,7 +64,7 @@
 function test_tags_propagated_to_run() {
   mkdir -p test
   cat << EOF >> test/BUILD
-load(":skylark.bzl", "test_rule")
+load(":starlark.bzl", "test_rule")
 
 test_rule(
     name = "test",
@@ -73,7 +73,7 @@
 )
 EOF
 
-  cat << 'EOF' >> test/skylark.bzl
+  cat << 'EOF' >> test/starlark.bzl
 def _test_impl(ctx):
   ctx.actions.run(
       outputs = [ctx.outputs.out],
@@ -102,7 +102,7 @@
 function test_tags_propagated_to_run_with_exec_info_in_rule() {
   mkdir -p test
   cat << EOF >> test/BUILD
-load(":skylark.bzl", "test_rule")
+load(":starlark.bzl", "test_rule")
 
 test_rule(
     name = "test",
@@ -111,7 +111,7 @@
 )
 EOF
 
-  cat << 'EOF' >> test/skylark.bzl
+  cat << 'EOF' >> test/starlark.bzl
 def _test_impl(ctx):
   ctx.actions.run(
       outputs = [ctx.outputs.out],
@@ -141,7 +141,7 @@
 function test_tags_not_propagated_to_run_when_incompatible_flag_off() {
   mkdir -p test
   cat << EOF >> test/BUILD
-load(":skylark.bzl", "test_rule")
+load(":starlark.bzl", "test_rule")
 
 test_rule(
     name = "test",
@@ -150,7 +150,7 @@
 )
 EOF
 
-  cat << 'EOF' >> test/skylark.bzl
+  cat << 'EOF' >> test/starlark.bzl
 def _test_impl(ctx):
   ctx.actions.run(
       outputs = [ctx.outputs.out],
diff --git a/src/test/shell/bazel/workspace_test.sh b/src/test/shell/bazel/workspace_test.sh
index 3b2a82b..c8bc513 100755
--- a/src/test/shell/bazel/workspace_test.sh
+++ b/src/test/shell/bazel/workspace_test.sh
@@ -171,7 +171,7 @@
   [ ! -L bazel-x ] || fail "bazel-x should have been removed"
 }
 
-function test_skylark_flags_affect_workspace() {
+function test_starlark_flags_affect_workspace() {
   cat >> $(create_workspace_with_default_repos WORKSPACE) <<EOF
 load("//:macro.bzl", "macro")
 print("In workspace: ")
diff --git a/src/test/shell/integration/aquery_test.sh b/src/test/shell/integration/aquery_test.sh
index a93994a..f50aa11 100755
--- a/src/test/shell/integration/aquery_test.sh
+++ b/src/test/shell/integration/aquery_test.sh
@@ -212,7 +212,7 @@
   assert_not_contains "echo unused" output
 }
 
-function test_aquery_skylark_env() {
+function test_aquery_starlark_env() {
   local pkg="${FUNCNAME[0]}"
   mkdir -p "$pkg" || fail "mkdir -p $pkg"
   cat > "$pkg/rule.bzl" <<'EOF'
diff --git a/src/test/shell/integration/bazel_query_test.sh b/src/test/shell/integration/bazel_query_test.sh
index 8c5d6b7..9e39953 100755
--- a/src/test/shell/integration/bazel_query_test.sh
+++ b/src/test/shell/integration/bazel_query_test.sh
@@ -272,7 +272,7 @@
   done
 }
 
-function test_skylark_dep_in_sky_query() {
+function test_starlark_dep_in_sky_query() {
   rm -rf foo
   rm -rf bar
   mkdir -p foo bar || fail "Couldn't make directories"
@@ -286,7 +286,7 @@
   expect_not_log "fakerule\.bzl"
 }
 
-function test_skylark_regular_file_not_included_in_rbuildfiles() {
+function test_starlark_regular_file_not_included_in_rbuildfiles() {
   rm -rf foo
   mkdir -p foo || fail "Couldn't make directories"
   echo "baz" > "foo/baz.bzl" || fail "Couldn't create baz.bzl"
@@ -299,7 +299,7 @@
   rm -rf foo
 }
 
-function test_skylark_symlink_source_not_included_in_rbuildfiles() {
+function test_starlark_symlink_source_not_included_in_rbuildfiles() {
   rm -rf foo
   mkdir -p foo || fail "Couldn't make directories"
   echo "moo" > "foo/moo" || fail "Couldn't create moo"
@@ -313,7 +313,7 @@
   rm -rf foo
 }
 
-function test_skylark_symlink_target_not_included_in_rbuildfiles() {
+function test_starlark_symlink_target_not_included_in_rbuildfiles() {
   rm -rf foo
   mkdir -p foo || fail "Couldn't make directories"
   echo "baz" > "foo/baz.bzl" || fail "Couldn't create baz.bzl"
@@ -327,7 +327,7 @@
   rm -rf foo
 }
 
-function test_skylark_glob_regular_file_not_included_in_rbuildfiles() {
+function test_starlark_glob_regular_file_not_included_in_rbuildfiles() {
   rm -rf foo
   mkdir -p foo || fail "Couldn't make directories"
   echo "baz" > "foo/baz.bzl" || fail "Couldn't create baz.bzl"
@@ -340,7 +340,7 @@
   rm -rf foo
 }
 
-function test_skylark_glob_symlink_source_not_included_in_rbuildfiles() {
+function test_starlark_glob_symlink_source_not_included_in_rbuildfiles() {
   rm -rf foo
   mkdir -p foo || fail "Couldn't make directories"
   echo "moo" > "foo/moo" || fail "Couldn't create moo"
@@ -354,7 +354,7 @@
   rm -rf foo
 }
 
-function test_skylark_glob_symlink_target_not_included_in_rbuildfiles() {
+function test_starlark_glob_symlink_target_not_included_in_rbuildfiles() {
   rm -rf foo
   mkdir -p foo || fail "Couldn't make directories"
   echo "baz" > "foo/baz.bzl" || fail "Couldn't create baz.bzl"
@@ -368,7 +368,7 @@
   rm -rf foo
 }
 
-function test_skylark_recursive_glob_regular_file_not_included_in_rbuildfiles() {
+function test_starlark_recursive_glob_regular_file_not_included_in_rbuildfiles() {
   rm -rf foo
   mkdir -p foo/bar || fail "Couldn't make directories"
   echo "baz" > "foo/bar/baz.bzl" || fail "Couldn't create baz.bzl"
@@ -381,7 +381,7 @@
   rm -rf foo
 }
 
-function test_skylark_recursive_glob_symlink_source_not_included_in_rbuildfiles() {
+function test_starlark_recursive_glob_symlink_source_not_included_in_rbuildfiles() {
   rm -rf foo
   mkdir -p foo/bar || fail "Couldn't make directories"
   echo "moo" > "foo/moo" || fail "Couldn't create moo"
@@ -395,7 +395,7 @@
   rm -rf foo
 }
 
-function test_skylark_recursive_glob_symlink_target_not_included_in_rbuildfiles() {
+function test_starlark_recursive_glob_symlink_target_not_included_in_rbuildfiles() {
   rm -rf foo
   mkdir -p foo/bar || fail "Couldn't make directories"
   echo "baz" > "foo/bar/baz.bzl" || fail "Couldn't create baz.bzl"
@@ -409,7 +409,7 @@
   rm -rf foo
 }
 
-function test_skylark_subdir_dep_in_sky_query() {
+function test_starlark_subdir_dep_in_sky_query() {
   rm -rf foo
   mkdir -p foo bar/baz || fail "Couldn't make directories"
   echo 'load("//bar:baz/fakerule.bzl", "const")' > foo/BUILD || fail "Couldn't write"
diff --git a/src/test/shell/integration/modify_execution_info_test.sh b/src/test/shell/integration/modify_execution_info_test.sh
index 61b0ab5..0a061d3 100755
--- a/src/test/shell/integration/modify_execution_info_test.sh
+++ b/src/test/shell/integration/modify_execution_info_test.sh
@@ -187,9 +187,9 @@
   fi
   local pkg="${FUNCNAME[0]}"
   mkdir -p "$pkg" || fail "mkdir -p $pkg"
-  echo "load('//$pkg:shell.bzl', 'skylark_shell')" > "$pkg/BUILD"
+  echo "load('//$pkg:shell.bzl', 'starlark_shell')" > "$pkg/BUILD"
   cat >> "$pkg/BUILD" <<'EOF'
-skylark_shell(
+starlark_shell(
   name = "shelly",
   output = "ok.txt",
 )
@@ -220,7 +220,7 @@
     command = "touch %s" % ctx.outputs.output.path,
   )
 
-skylark_shell = rule(
+starlark_shell = rule(
   _impl,
   attrs = {
     "output": attr.output(mandatory=True),
diff --git a/src/test/shell/integration/outputs_test.sh b/src/test/shell/integration/outputs_test.sh
index e2f523a..864e1b2 100755
--- a/src/test/shell/integration/outputs_test.sh
+++ b/src/test/shell/integration/outputs_test.sh
@@ -210,4 +210,4 @@
   expect_log "Attribute foo is configurable and cannot be used in outputs"
 }
 
-run_suite "skylark outputs tests"
+run_suite "starlark outputs tests"
diff --git a/src/test/shell/testenv.sh b/src/test/shell/testenv.sh
index a48de5e..3e9d909 100755
--- a/src/test/shell/testenv.sh
+++ b/src/test/shell/testenv.sh
@@ -439,7 +439,7 @@
 EOF
 }
 
-function setup_skylark_javatest_support() {
+function setup_starlark_javatest_support() {
   setup_javatest_common
   grep -q "name = \"junit4-jars\"" third_party/BUILD \
     || cat <<EOF >>third_party/BUILD