Skip to content

CompilerCompat: Include compat modules only when they have version.txt#2033

Merged
ZacSweers merged 1 commit intoZacSweers:mainfrom
kevinguitar:add-version-txt-check
Mar 23, 2026
Merged

CompilerCompat: Include compat modules only when they have version.txt#2033
ZacSweers merged 1 commit intoZacSweers:mainfrom
kevinguitar:add-version-txt-check

Conversation

@kevinguitar
Copy link
Copy Markdown
Contributor

This PR resolves an error when there are stale compiler targets with build dirs, currently they will be picked up because of this check. I've enhanced it a bit and check for version.txt existence.

Could not determine the dependencies of task ':compiler:shadowJar'.
> Could not resolve all dependencies for configuration ':compiler:embeddedClasspath'.
   > Could not resolve project :compiler-compat:k2320_beta2.
     Required by:
         project ':compiler'
      > Unable to find a matching variant of project :compiler-compat:k2320_beta2:
          - No variants exist.
   > Could not resolve project :compiler-compat:k2320_dev_5706.
     Required by:
         project ':compiler'
      > Unable to find a matching variant of project :compiler-compat:k2320_dev_5706:
          - No variants exist.
   > Could not resolve project :compiler-compat:k2320_beta1.
     Required by:
         project ':compiler'
      > Unable to find a matching variant of project :compiler-compat:k2320_beta1:
          - No variants exist.

Comment thread compiler/build.gradle.kts
add(embedded.name, project(":compiler-compat"))
rootProject.isolated.projectDirectory.dir("compiler-compat").asFile.listFiles()!!.forEach {
if (it.isDirectory && it.name.startsWith("k")) {
if (it.isDirectory && it.name.startsWith("k") && File(it, "version.txt").exists()) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Let me know if it's better to check for build.gradle.kts, but I think since it's generated via a script, either way should be alright

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Works for me ¯_(ツ)_/¯. But there are multiple places that do this so this might not be enough

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah yeah, I see it now 🙈

@ZacSweers ZacSweers merged commit 82e230e into ZacSweers:main Mar 23, 2026
23 checks passed
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