Skip to content

RFC 0002: Versioning and downstream compatibility - #79

Merged
Swimburger merged 3 commits into
cloudflare:mainfrom
Swimburger:rfc-0002-versioning-and-compatibility
Nov 2, 2026
Merged

Swimburger merged 3 commits into
cloudflare:mainfrom
Swimburger:rfc-0002-versioning-and-compatibility

Conversation

@Swimburger

@Swimburger Swimburger commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • use one lockstep version for the Git release, Cargo package, binary, and npm package
  • bundle WIT with Forge while versioning plugin-interface compatibility separately
  • define concrete breaking changes for specs, plugins, and generated code
  • document exactly what cf pins and how it runs Forge during generation

Draft for feedback under FORGE-4.

Decisions to review

  • before 1.0, compatible Forge releases increment patch and breaking releases increment minor
  • WIT changes only when the plugin interface changes
  • an additive WIT change is compatible only when an old plugin still runs

Checks

  • pnpm check

@Swimburger
Swimburger marked this pull request as ready for review October 30, 2026 19:46

@srikrsna srikrsna left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good, just left some minor comments.

- **Generated code:** If a Forge change makes downstream code migrate, it is
breaking even when the spec and plugin still compile.

## How cf uses Forge

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think we can remove this section, cf is just one of our users for our use case.

Comment on lines +20 to +22
Before Forge 1.0, compatible changes increment the patch version and breaking
changes increment the minor version. After 1.0, Forge follows normal semantic
versioning.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should also be able to increment the minor version for new features like landing a new plugin before the major. We need not reserve it for just breaking changes.

Also, no need to change the RFC, but we should start following this once we start publishing.

Comment on lines +17 to +18
`Cargo.toml` is the source of the Forge version. The release process copies it to
the npm package and checks that the Git tag and `forge --version` match.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should also document how the repo itself maintains versions. My take is between releases the repo will show the last released version.

Comment on lines +36 to +38
- **Specs:** A spec that Forge accepts keeps working with the same meaning.
Removing a supported OpenAPI shape or extension is breaking. Extension renames
first accept both names and give developers time to migrate.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would lean on the normalize command for this going forward instead of accepting everything

the interface between Forge and a plugin changes.

A change is breaking when a developer must change a spec or plugin, rebuild a
plugin, or migrate incompatible generated code.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Forge can be used as a rust crate too, so I think we should include that here.

@Swimburger
Swimburger requested a review from srikrsna November 2, 2026 15:41
@Swimburger
Swimburger merged commit c968d8a into cloudflare:main Nov 2, 2026
2 checks passed
@Swimburger
Swimburger deleted the rfc-0002-versioning-and-compatibility branch November 2, 2026 15:52
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.

2 participants