Skip to content

feat(processor): support no-arg @ServiceProvider via contract inference - #13

Closed
LMLiam wants to merge 47 commits into
mainfrom
codex/update-serviceprovider-default-and-add-diagnostics
Closed

feat(processor): support no-arg @ServiceProvider via contract inference#13
LMLiam wants to merge 47 commits into
mainfrom
codex/update-serviceprovider-default-and-add-diagnostics

Conversation

@LMLiam

@LMLiam LMLiam commented Jan 19, 2026

Copy link
Copy Markdown
Owner

Description

  • Remove the Foojay toolchains settings plugin from settings.gradle to avoid mandatory plugin resolution during settings evaluation.
  • Add support in the processor/annotation code for no-arg @ServiceProvider usage by giving ServiceProvider a default empty value and implementing inferContractsFromProvider in ServiceSchemeProcessor to BFS supertypes and collect @ServiceContract interfaces; emit a clear compilation error when none can be inferred.
  • Add unit tests covering no-arg provider inference and the error case in ServiceSchemeProcessorSpec.kt.

Codex Task

LMLiam added 30 commits August 31, 2025 12:22
LMLiam and others added 17 commits August 31, 2025 12:22
…tes, feature requests, questions, refactor proposals, and test coverage requests
Co-authored-by: LMLiam <46268350+TheRealEmissions@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8aa16d6ce6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread settings.gradle
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0'
}

rootProject.name = 'spi-tooling'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep a Java 24 toolchain source configured

Removing the Foojay toolchains resolver here means Gradle no longer has any toolchain download repository configured. The modules still request Java 24 toolchains (see modules/annotations/build.gradle and modules/processor/build.gradle), so any environment without a locally installed JDK 24 will now fail toolchain resolution with “no compatible toolchain” instead of provisioning one. If the intent is to avoid network access during settings evaluation, consider an alternative local toolchain repo configuration or lowering the toolchain version to what’s already installed rather than dropping resolver support entirely.

Useful? React with 👍 / 👎.

@LMLiam LMLiam added type:feature Feature request or enhancement area:processor Annotation processor: discovery, validation, META-INF/services generation labels Jun 6, 2026
@LMLiam LMLiam changed the title Make Gradle runner resilient to local JDK and remove Foojay plugin build(gradle): make the runner resilient to local JDK and drop the Foojay plugin Jun 6, 2026
@LMLiam LMLiam closed this Jun 6, 2026
@LMLiam LMLiam changed the title build(gradle): make the runner resilient to local JDK and drop the Foojay plugin feat(processor): support no-arg @ServiceProvider via contract inference Jun 6, 2026
@LMLiam

LMLiam commented Jun 6, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #46. Auto-closed by the main history rewrite; recreated as #46 with the rebased branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:processor Annotation processor: discovery, validation, META-INF/services generation codex type:feature Feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant