GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Built-in check for generate functions by eunomie · Pull Request #12923 · dagger/dagger

Conversation

@eunomie

@eunomie eunomie commented Apr 8, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Currently we have one single function in .dagger main module that runs all the generate functions and ensure the result is empty.
Those changes handle that in the engine: all generate functions are now automatically handled as a check function. When they are run, it will succeed if the resulting changeset is empty.

This allows to always ensure all generated functions are correctly run on CI, without to introduce a new module or concept.
Just declare your checks and generates and both dagger generate and dagger checks will work.

You can still use dagger check --no-generate if you don't want to include the generate functions.

$ dagger check -l

Name                                         Description
ci:bootstrap                                 Build dagger from source, and check that it can bootstrap its own CI
cli:release-dry-run                          Verify that the CLI builds without actually publishing anything
docs:lint-markdown                           Lint documentation files
elixir-sdk:codegen-test                      Run dagger_codegen tests
elixir-sdk:lint                              Lint the SDK
elixir-sdk:release-dry-run                   Test the publishing process
elixir-sdk:sdk-test                          Run the SDK tests
...
typescript-sdk:test-nodejs-lts               Test the SDK with LTS version of Node
typescript-sdk:test-nodejs-prev-lts          Test the SDK with previous LTS version of Node

Generators
changelog:generate                           Generate the changelog with 'changie merge'. Only run this manually, at release time.
docs:references                              Regenerate the API schema and CLI reference docs
engine-dev:generate                          Generate any engine-related files
go-sdk:generate                              Regenerate the Go SDK API
...

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@eunomie
eunomie requested review from a team as code owners April 8, 2026 10:43
@eunomie
eunomie force-pushed the generate-check branch from 2a49222 to 1a468a1 Compare April 8, 2026 11:06
@idlsoft

idlsoft commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

If I understand it correctly this turns all +generate functions into +check functions.
It may be useful to have some granular control over it.
For example if generated files are not committed, a check would fail, right?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eunomie

eunomie commented Apr 8, 2026

Copy link
Copy Markdown
Member Author

For example if generated files are not committed, a check would fail, right?

Yes, but that's exactly the purpose of generate functions, to generate files that should be committed.
On dagger/dagger for instance we always have a check that runs all the generate functions and check it's empty. It's just that but better, more explicit, and more control on top of it as it allows to dagger check my-generate-function as it wasn't possible previously.

kpenfound reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eunomie
eunomie force-pushed the generate-check branch from 1a468a1 to c94c313 Compare April 8, 2026 15:04
kpenfound
kpenfound approved these changes Apr 9, 2026
View reviewed changes

@kpenfound kpenfound left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM. Some conflicts though

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@eunomie
eunomie force-pushed the generate-check branch 3 times, most recently from 0b57609 to ac214f6 Compare April 16, 2026 15:40
@eunomie
eunomie requested a review from a team as a code owner April 16, 2026 15:40
@eunomie
eunomie force-pushed the generate-check branch 3 times, most recently from 9cdb3a1 to 7b10400 Compare April 18, 2026 16:55
@eunomie
eunomie force-pushed the generate-check branch 3 times, most recently from 971629e to 3537b00 Compare April 29, 2026 14:52
eunomie added 3 commits April 30, 2026 09:26
@eunomie
qualify +generate functions as checks
f2d4f89
Extend check discovery to include +generate functions. When listing
or running checks, generator functions are automatically included.
A generate-as-check passes when the generator produces an empty
changeset and fails otherwise.

- Add IsGenerate field to Check, CheckType() returning "check"/"generate"
- Add RunGeneratorAsCheck on ModTreeNode with check telemetry spans
- Add scale-out support via tryRunGeneratorAsCheckScaleOut
- Add noGenerate param through Module.Checks, Env.Checks, and all
  schema resolvers (workspace, module, env)
- Add checkType GraphQL resolver on Check
- Add --no-generate CLI flag to dagger check
- Split check list output with dedicated "Generators" section
- Deduplicate when a function has both +check and +generate annotations
- ignoreChecks toolchain config also applies to generate-as-checks
- Add integration tests with Go test module, including ignoreChecks tests

Signed-off-by: Yves Brissaud <[email protected]>
@eunomie
chore: changie
fc9a557
Signed-off-by: Yves Brissaud <[email protected]>
@eunomie
chore: generate
b91e864
Signed-off-by: Yves Brissaud <[email protected]>
@eunomie
eunomie force-pushed the generate-check branch from 3537b00 to b91e864 Compare April 30, 2026 07:43
@eunomie

eunomie commented Apr 30, 2026

Copy link
Copy Markdown
Member Author

I'm merging the PR:

  • ✔️ cli:release-dry-run manually validated
  • ✔️ engine-dev:release-dry-run manually validated
  • ✔️ dagger-dev:generated manually validated

Once dagger cloud will run on a version including those changes, we will be able to fully remove the engine-dev:generated check as it will be a duplication of the built-in checks.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eunomie
eunomie merged commit 18733b3 into dagger:main Apr 30, 2026
2 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@eunomie
eunomie deleted the generate-check branch April 30, 2026 09:35
@tiborvass tiborvass mentioned this pull request May 4, 2026
chore: prep for v0.20.7 #13069
Merged
@matipan matipan mentioned this pull request May 15, 2026
engine: verify no new APIs get added without version gates #13155
Closed
@BrewTestBot BrewTestBot mentioned this pull request May 26, 2026
dagger 0.21.0 Homebrew/homebrew-core#284802
Merged
@dagger-codex dagger-codex Bot mentioned this pull request Jun 4, 2026
fix: preserve workspace check scale-out context #13329
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@kpenfound kpenfound kpenfound approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@eunomie @idlsoft @kpenfound
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.