pierrejeambrun commented on code in PR #74231:
URL: https://github.com/apache/airflow/pull/74231#discussion_r4184246757


##########
airflow-core/src/airflow/ui/src/components/MonacoEditor/configureMonaco.ts:
##########
@@ -58,17 +58,48 @@ const loadMonacoModules = async () => {
     ),
   ]);
 
-  // The JSON feature registers its language as a side effect. Python is 
registered
-  // manually below from its grammar module instead of importing its register 
module,
-  // whose lazy tokens provider would overwrite our patched grammar on first 
use.
-  // The runtime guard below fails loudly if the grammar export shape changes.
+  // The JSON feature registers its language as a side effect. The 
Dag-authoring languages
+  // are registered manually below from their grammar modules instead: Python 
needs its
+  // patched grammar (triple-quoted f-string support) applied before 
registering, which
+  // importing its register module instead would not allow, and the others are 
registered
+  // the same way for consistency.
+  // The runtime guard below fails loudly if a grammar export shape changes.
   const jsonContribution = 
import("monaco-editor/languages/features/json/register");
   const pythonGrammar = 
import("monaco-editor/languages/definitions/python/python");
+  const typescriptGrammar = 
import("monaco-editor/languages/definitions/typescript/typescript");
+  const javaGrammar = import("monaco-editor/languages/definitions/java/java");
+  const goGrammar = import("monaco-editor/languages/definitions/go/go");

Review Comment:
   For consistency we register all languages the same way, even if 
theoritically it's only needed for python patching.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to