Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions codeflash/languages/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,6 @@ def _ensure_languages_registered() -> None:

# Import support modules to trigger registration
# These imports are deferred to avoid circular imports
import contextlib

with contextlib.suppress(ImportError):
from codeflash.languages.python import support as _

with contextlib.suppress(ImportError):
from codeflash.languages.javascript import support as _

with contextlib.suppress(ImportError):
from codeflash.languages.java import support as _

with contextlib.suppress(ImportError):
from codeflash.languages.java import support as _ # noqa: F401

_languages_registered = True
Comment on lines 50 to 51
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical Bug: This optimization completely breaks language registration.

The removed imports are the only mechanism that triggers the @register_language decorators in python/support.py, javascript/support.py, and java/support.py. Without them, _EXTENSION_REGISTRY and _LANGUAGE_REGISTRY will remain empty, causing get_language_support(), detect_project_language(), and all downstream functionality to fail with UnsupportedLanguageError.

The function's entire purpose is to lazily import these modules for their side effects (registration). Removing the imports makes it a no-op that just sets a boolean flag.

This PR should not be merged.


Expand Down
Loading