Skip to content
← Back to activity

Public problem

How to regenerate dagger.gen.go after changing module functions

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

After running dagger init --sdk=go and then modifying the module's functions, the generated dagger.gen.go file still references the old default functions like ContainerEcho and GrepDir, producing compile errors. The file is generated code and hand-editing it just fights the tooling.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

Run dagger develop. It regenerates dagger.gen.go from the current module sources. This is now documented in the official docs, and the reporter confirmed the docs update resolved the question.

Source: https://github.com/dagger/dagger/issues/7044

Source: https://github.com/dagger/dagger/issues/7044