The regex for extracting modules from settings.gradle only matched
single-line include statements. Multi-line includes like eureka's
(include 'a',\n 'b',\n 'c') only captured the first module, causing
test_module to be None and breaking multi-module path resolution
(e.g., classfiles lookup for JaCoCo coverage conversion).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Parse listOf(...) patterns in settings.gradle.kts for projects that
build include lists dynamically (e.g. OpenRewrite)
- Use word boundary in include regex to avoid matching variable names
like 'includedProjects'
- Break module voting ties using codeflash.toml module-root config,
so the function's own module is preferred over cross-module tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Added functions to install the Codeflash runtime and manage its dependency in the Maven POM file.
- Implemented JaCoCo plugin addition and configuration for test coverage.
- Enhanced XML parsing for POM files to support both namespaced and non-namespaced formats.
- Updated test cases to reflect changes in dependency management and plugin configuration.
- Removed obsolete runtime jar finding logic and consolidated module detection for both Maven and Gradle projects.
- Improved input validation for test run commands.
The base class had duplicate _get_java_sources_root and _fix_java_test_paths
methods that were overridden by JavaFunctionOptimizer. The base class also
had an is_java() block in generate_and_instrument_tests that used undefined
variables (used_behavior_paths, is_java). Removed all dead code since
JavaFunctionOptimizer.fixup_generated_tests handles this properly.
Also updated JavaFunctionOptimizer._fix_java_test_paths to accept
display_source parameter and use whole-word rename for collision handling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix min/max_outer_loops → pytest_min/max_loops in Java test_run_and_parse
- Update test_replacement.py for new replace_function_definitions_for_language API
- Update JavaSupport.discover_functions signature to match protocol
- Migrate _get_java_sources_root/_fix_java_test_paths to JavaFunctionOptimizer
- Fix test_java_tests_project_rootdir to use set_current_language
- Replace regex-based module extraction with proper XML parser (_extract_modules_from_pom_content)
- Add Maven profile support via CODEFLASH_MAVEN_PROFILES env var in _run_maven_tests and _compile_tests
- Extend _path_to_class_name with optional custom source directory support
- Add _extract_source_dirs_from_pom to parse custom source/test directories from pom.xml
- Add comprehensive tests for all new functionality (27 new tests)