@meteorcloudy  /cc @Wyverald  Yeah there's a bunch of quality-of-life changes we should make around the Starlark-running part of bzlmod before official launch. This goes even further: If a module extension specifies incorrect attributes for a repository rule, an error is printed but the build doesn't fail.
`print` in a module appears to be different from `print` in a workspace rule
### Description of the problem / feature request:

`print` appears to behave differently between workspace rules and when used in a module.

When called from a workspace, the output of `print` is prefixed by a `DEBUG` statement, and then the path to the file, whereas this is missing when the same function is called from a module.

### What's the output of `bazel info release`?

5.0.0rc3

### Any other information, logs, or outputs that you want to share?

The way that `print` works when called from a workspace is nicer: it makes the output easy to identify and it's easy to grep for.
src/main/java/com/google/devtools/build/lib/bazel/bzlmod/SingleExtensionEvalFunction.java
src/main/java/com/google/devtools/build/lib/bazel/bzlmod/SingleExtensionEvalFunction.java
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/bzlmod/SingleExtensionEvalFunction.java b/src/main/java/com/google/devtools/build/lib/bazel/bzlmod/SingleExtensionEvalFunction.java
index 889f85ef5f40ab..cd85ff18046bbb 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/bzlmod/SingleExtensionEvalFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/bzlmod/SingleExtensionEvalFunction.java
@@ -86,6 +86,7 @@ public void setRepositoryRemoteExecutor(RepositoryRemoteExecutor repositoryRemot
     this.repositoryRemoteExecutor = repositoryRemoteExecutor;
   }
 
+  @Nullable
   @Override
   public SkyValue compute(SkyKey skyKey, Environment env)
       throws SkyFunctionException, InterruptedException {
@@ -161,6 +162,7 @@ public SkyValue compute(SkyKey skyKey, Environment env)
     try (Mutability mu =
         Mutability.create("module extension", usagesValue.getExtensionUniqueName())) {
       StarlarkThread thread = new StarlarkThread(mu, starlarkSemantics);
+      thread.setPrintHandler(Event.makeDebugPrintHandler(env.getListener()));
       ModuleExtensionContext moduleContext =
           createContext(env, usagesValue, starlarkSemantics, extension);
       threadContext.storeInThread(thread);
