Skip to content

Add @Start and deprecate @Up - #24

Draft
eunomie wants to merge 3 commits into
dagger:mainfrom
eunomie:start-rename-java-sdk-8d8ed0a3
Draft

eunomie wants to merge 3 commits into
dagger:mainfrom
eunomie:start-rename-java-sdk-8d8ed0a3

Conversation

@eunomie

@eunomie eunomie commented Sep 24, 2026

Copy link
Copy Markdown
Member

Adds @Start, the Java marker for a service function, as part of the dagger up → dagger start rename (dagger/dagger#14218). The engine part is dagger/dagger#14328.

This change works on engines that predate start. @Start registers the function through Function.withUp, the same call @Up makes. Engines have had withUp since v0.20.4.

  • @Start (io.dagger.module.annotation.Start) marks a function as a service for dagger start.
  • @Up keeps working. It is @Deprecated, and its Javadoc points at @Start. Modules that use it build as before; javac adds a deprecation note.
  • The annotation processor treats either annotation as a service marker. Its own lookup of @Up suppresses the deprecation warning, because the processor is compiled inside every generated module.
  • A new e2e check, e-2-e:service-marker-check, generates a module with a @Start function, an @Up function, and an unmarked function that returns a Service. It loads the module and asserts through Module.services that only the first two are services.

Verification

  • engine-e-2-e:sdk-contract-check (all 8 e-2-e:* checks) and engine-e-2-e:dev-sdk-check pass at e853f4e. Both run inside an engine built from dagger/dagger 8fd9b22b5416, the commit engine-dev is pinned to. That engine has dagger up and no start, so the passing service-marker-check shows that @Start works on an engine that predates start.
  • Negative control: with the processor's @Start branch removed, service-marker-check fails with a @Start function should be a service; services: up-marked.

Notes

  • A module gets @Start when dagger generate vendors the new SDK source into it. Until then its vendored copy has only @Up, which keeps working.
  • Modules on the engine's builtin java runtime use dagger/dagger sdk/java, which gets @Start in Rename dagger up to dagger start dagger#14328.
  • This repository has no tags and no changelog. Workspaces install it from its default branch, so merging releases it; a workspace that locked an earlier commit gets it when it refreshes its lock. This description is the record of the change.

dagger up is renamed to dagger start (dagger/dagger#14218). @start
registers through withUp, as @up does, so it needs no engine change.

Signed-off-by: Yves Brissaud <yves@dagger.io>
Signed-off-by: Yves Brissaud <yves@dagger.io>
The processor is compiled inside every generated module, so its own
use of @up would warn in modules that never use it.

Signed-off-by: Yves Brissaud <yves@dagger.io>
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.

1 participant