-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Figure out, and document, what semver means for us #63
Comments
One thing to look at is what other codegen libraries do. There aren't a ton that aren't 0.x and have reasonable usage, but from what I can find:
In general I feel that aligns with what I wrote above: the first sense is fine, the second we should try to minimize but we can see what's reasonable. |
Good documentation style to crib from: https://main--typescript-eslint.netlify.app/users/versioning/ |
At this point I think what we are doing so far is fine:
|
We've been in need of a documentation revamp for a while; a giant FAQ was never the greatest structure and got worse as it grew. In this commit I reorganize the documentation. Most of it is just moving around existing text, but I added some new documentation here and there. The changes: - Many of the FAQ questions have moved to several new docs, on the client/runtime, handling your schema, and various operation types; the FAQ has answers to a few of the actually most frequent questions, as well as a few things that didn't fit elsewhere. - We now have a `docs/README.md` which acts as an index, so we can just link to `/docs`. - I lowercased the files that don't need match a GitHub convention, so it's a bit less yell-y. - I added documentation on: - how we version genqlient (fixes #63) - newer options for optional types - a bit more on custom scalars and integer types (fixes #128)
We've been in need of a documentation revamp for a while; a giant FAQ was never the greatest structure and got worse as it grew. In this commit I reorganize the documentation. Most of it is just moving around existing text, but I added some new documentation here and there. The changes: - Many of the FAQ questions have moved to several new docs, on the client/runtime, handling your schema, and various operation types; the FAQ has answers to a few of the actually most frequent questions, as well as a few things that didn't fit elsewhere. - We now have a `docs/README.md` which acts as an index, so we can just link to `/docs`. - I lowercased the files that don't need match a GitHub convention, so it's a bit less yell-y. - I added documentation on: - how we version genqlient (fixes #63) - newer options for optional types - a bit more on custom scalars and integer types (fixes #128) Reviewers, you can see what it all looks like together [here](https://github.com/Khan/genqlient/tree/benkraft.docs-reorg/docs#readme). Fixes #245. I have: - [x] Written a clear PR title and description (above) - [x] Signed the [Khan Academy CLA](https://www.khanacademy.org/r/cla) - [x] Added tests covering my changes, if applicable (n/a) - [x] Included a link to the issue fixed, if applicable - [x] Included documentation, for new features - [x] Added an entry to the changelog (n/a)
In particular, obviously it's a breaking change if we change the signature of an exported symbol, like
graphql.Client
orgenerate.Main
. But are these breaking changes?The first question is: do we want to treat as breaking a change to the code-generator such that the new generated code has the same API but different implementation? If you have a test to require that
go generate ./...
doesn't make any changes, this will break that test, and that test is a reasonable thing you might want to have. But I think realistically there's no way we can treat that as a breaking change, since probably half our commits, including plenty of bugfixes, will change some generated code you might have.The second question is: what if the new generated code has a breaking change in its API? This is only a breaking change once you run
go generate ./...
. I think in many cases we will want to treat it as a breaking change; certainly if we, say, change a type-name or the query-method signature! But what if we, make a change that's non-breaking if you use genqlient the expected way, but is breaking if you, say, use those structs for random other stuff? We'll want to see how much of an issue that might be for us, and document whatever we intend clearly. (This is extra true if you put your own code in the same package as the generated code, in which case there's nothing to stop you from calling internal helpers like__unmarshalWhateverType
, which we definitely don't intend to be public API.)Of course we don't need to figure this out perfectly until we cut a v1.0.0; until then we can just try our best and see what happens as we go.
Another issue is what code-generator versions are compatible with what runtime-library versions, but I suspect that will be a simpler issue.
The text was updated successfully, but these errors were encountered: