Skip to content

revert(engine): remove entrypoint resource tracking - #14661

Closed
grouville wants to merge 1 commit into
mainfrom
remove-entrypoint-resources
Closed

grouville wants to merge 1 commit into
mainfrom
remove-entrypoint-resources

Conversation

@grouville

@grouville grouville commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

I think the confusion came from two things: giving the Go compiler the files it needs, and making sure a change to those files invalidates the function cache.

resources solved both at module load: it selected external checkout files and added their contents to the module's source digest. So changing a local Go dependency or an embedded file also changed the module's cache key.

With the workspace approach, we move that responsibility to the Go SDK:

  • A module that compiles with external checkout files must take a required ws on every exported constructor and function. Having it only on the constructor isn't enough.
  • A fresh workspace affects the function's cache key before lookup. The SDK can then read the current inputs, follow Go imports, local replace targets and go:embed, and materialize the files the compiler needs.
  • The function runs again for a fresh local workspace, but Go builds can still reuse their cache when the selected file contents haven't changed.

So we don't need the engine to select or hash those external files as well. This PR removes the optional entrypoint resources support added in #14639, including its resource-loading code, tests and spec text. It doesn't change workspace routing.

The SDK change is in go-sdk#64, stacked on Yves's #63. The repository module ports are separate in #14664. Modules that use resource-based invalidation need the workspace pattern before adopting this rollback; simply removing their resource declarations wouldn't fix caching.

Validation: the entrypoint and Dang v2 unit packages pass. SDK generation succeeds on both an unmodified beta.17 engine and an engine rebuilt from this rollback. Changing only the fixture's external embedded file changes its result on both engines, without regenerating the module. The go-sdk/generate/stale CI check also fails on the current main commit (92eb2a4); the broader generated-client changes stay out of this standalone revert.

@grouville
grouville force-pushed the remove-entrypoint-resources branch from 0c90001 to dd05a81 Compare October 13, 2026 23:17
@grouville
grouville force-pushed the remove-entrypoint-resources branch from e4b0fb3 to 925c2ca Compare October 14, 2026 02:10

@eunomie eunomie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

just to hold on the merge, I want to verify some stuff before we rollback

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.

3 participants