pierrejeambrun opened a new pull request, #74643: URL: https://github.com/apache/airflow/pull/74643
Follow-up to #74633 (stacked on it; only the last commit is new here). Dag importers are pluggable: the YAML importer (#74586), the Go/Java/TypeScript coordinators, and any third-party importer each store their own language id in `dag_code.language`. Core can't know that list, so hardcoding grammars in the UI means a custom importer (say a `json` or `rust` one) gets plain-text Dag source in the Code tab until someone patches the UI. Monaco already ships a lazy registration for every Monarch grammar it bundles. Registering that instead lets the Code tab highlight whatever language the API returns, fetching a grammar chunk only the first time a Dag source uses it. The UI stops listing grammars and no longer loads the Go/Java/TypeScript/YAML grammars up front for Python-only deployments. Python keeps the patched f-string grammar (#67986), now loaded lazily too. Unknown ids (for example the `"text"` placeholder written when a source can't be read) still fall back to plain text. Opening a YAML Dag only loads the YAML grammar chunk; a Python Dag only loads Python: | YAML Dag | Python Dag | |---|---| |  |  | --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 5.5) Generated-by: Claude Code (Opus 5.5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
