Skip to content

Fix SourceSetContainer lookup in buildSamples task configuration - #635

Merged
Saloed merged 1 commit into
UnitTestBot:mainfrom
dolmatovDan:fix/python-samples-source-sets
Nov 1, 2026
Merged

Saloed merged 1 commit into
UnitTestBot:mainfrom
dolmatovDan:fix/python-samples-source-sets

Conversation

@dolmatovDan

Copy link
Copy Markdown
Contributor

#634 broke ci-python on main (run https://github.com/UnitTestBot/usvm/actions/runs/41299659885): with cpythonActivated=true, Gradle fails to create :usvm-python:buildSamples with Extension of type 'SourceSetContainer' does not exist. In registerBuildSamplesTask, the replacement for the sourceSets accessor calls extensions inside the tasks.register<JavaExec> { ... } configuration block, where it resolves to the task's extensions instead of the project's. The removed accessor was defined only on Project, so it did not have this problem.

Use project.extensions there. The other replacements from #634 are called directly on Project and are unaffected.

Validation: with -PcpythonActivated=true, both ./gradlew -m :usvm-python:test and ./gradlew tasks --all (which creates every task in every project) fail on current main with the CI error and pass with this change. The Python tests themselves were not run locally, since they require a CPython build; my validation for #634 missed this because it ran without cpythonActivated, so the lazily registered task was never created.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Saloed
Saloed merged commit 6b2a078 into UnitTestBot:main Nov 1, 2026
7 checks passed
@dolmatovDan
dolmatovDan deleted the fix/python-samples-source-sets branch November 1, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants