Release automation.#917
Conversation
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request restructures the project's contribution documentation by moving detailed guidelines from the root CONTRIBUTING.md to a new docs/contributing directory, which now includes dedicated guides for publishing and pull requests. It also updates package versions and adds publishing restrictions to internal tools. The review feedback identified several opportunities to improve the clarity, grammar, and link stability of the newly added documentation files.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
| 2. **Not yet published**: the package's `version:` ends with a `-dev<N>` suffix (see "`-dev` vs non-`-dev`" below). Published to pub.dev only to reserve the name; not ready for general use yet. | ||
| 3. **Published**: any other package. Each has its own version cadence on pub.dev. | ||
|
|
||
| Note: `resolution: workspace` in a `pubspec.yaml` is a tooling concern — it tells Dart to share dependency resolution and a lockfile with the monorepo, and it does **not** by itself imply anything about release cadence. A package can opt out of the workspace (omit `resolution: workspace`) to avoid circular dependencies or unrelated update churn while still being a published package. |
There was a problem hiding this comment.
If a package opts out of the monorepo, however, it is then implicitly switching to using published packages only, and local changes won't be testable without manual editing of the pubspec files to use local paths, or publishing the dependent packages.
How does using the monorepo increase circular dependency problems? It seems like it would make them better, not worse, since you're using the local versions of the code. But maybe I don't understand the use case you're describing.
And what kind of "update churn"? Since it doesn't imply anything about release cadence, I wouldn't think that would increase the churn. Are you referring to churn in publishing other packages, or churn the package that is part of the monorepo?
There was a problem hiding this comment.
Thank you!
Yes this documentation was confusing and some sentences are wrong. Updated.
We still use advantages of monorepo. Added section to explain how.
|
|
||
| 1.2. The package's changes touch only non-publishable code or docs (like tests, tools, or not-publishable docs). | ||
|
|
||
| You can publish `-dev<number>` versions, if you need it for development. |
There was a problem hiding this comment.
What is the format of <number>? Is it another semver number, or just an ordinal? Is it zero padded, or does it have a dash?
e.g. which of these is it?:
0.1.0-dev10.1.0-dev0010.1.0-dev-1- `0.1.0-dev-0.1.0'
There was a problem hiding this comment.
Thank you. Updated doc.
There was a problem hiding this comment.
I don't see a description of the format of <number> in the -dev<number> suffix.
|
|
||
| You can publish `-dev<number>` versions, if you need it for development. | ||
|
|
||
| 2. If your feature is partially implemented, hide the feature's code behind a false-by-default flag, and use **release-ready** version. |
There was a problem hiding this comment.
Where are the flags specified? Are they --define flags for the Dart compiler? Or are they command line flags? Something else?
There was a problem hiding this comment.
We do not have it organized yet. Documented that it is not defined yet.
|
|
||
| For packages with `resolution: workspace` in their pubspec.yaml, pub resolves every sibling from its local source directory — not from pub.dev, as long as its `version:` satisfies the consumer's constraint. | ||
|
|
||
| If a local bump escapes that constraint (e.g. `^0.9.0` → `0.10.0`), update the consumer's `pubspec.yaml` in the same PR. Otherwise pub silently falls back to the published version on pub.dev. |
There was a problem hiding this comment.
Can we have a check for this?
|
|
||
| After a new version of a dependency (including sibling package in this repo) is published, this is how upgrade will happen: | ||
|
|
||
| 1. [Dependabot] detects the new version on pub.dev and opens a PR per dependency, bumping the constraint in each consuming `pubspec.yaml`. See [About Dependabot version updates] for details. |
There was a problem hiding this comment.
Is there any way to add a new section to each CHANGELOG.md too?
There was a problem hiding this comment.
Not natively — Dependabot only edits the manifest. I filed a feature request upstream: dependabot/dependabot-core#15057. For now the doc calls out that the CHANGELOG.md entry has to be added by the maintainer before merging.
There was a problem hiding this comment.
Filed an issue and added comment: dependabot/dependabot-core#15057
| ## Shell scripts | ||
|
|
||
| Do not review pull requests when they are in draft state, unless explicitly requested by the author. | ||
| To run a script in `tool/`, open the script in VSCode and press ⇧⌘B. |
There was a problem hiding this comment.
Also add instructions for where to run the script from on the command line: not everyone uses VSCode, and that key binding is Mac-only, so you might include the default Linux keybinding too (which is likely to be the same as Windows). They also might have changed the keybinding...
|
|
||
| ## 0.2.4 (in progress) | ||
|
|
||
| - **Refactor**: Update core framework to v0.9 (#546dab9be). |
There was a problem hiding this comment.
This comment is now lost. When will it be added back in? Shouldn't there be a section for in progress (-dev) changes?
There was a problem hiding this comment.
-
Changed the comment to make sense in the context of the package genai_primitives, that is not concerned about genui.
-
Bumped version
There was a problem hiding this comment.
But what about in-progress changes: Say I've committed something that isn't meant to be published yet, but I want to accumulate CHANGELOG entries for it when it is published. How am I supposed to do that? I would think there would be a ## 0.2.4-dev entry here with those things, that gets converted to a ## 0.2.4 heading before it is published.
There was a problem hiding this comment.
Yes, you are right.
And this change is samll enough to hold for next release.
Changed.
| name: fix_copyright | ||
| description: A command line app to fix copyright headers. | ||
| publish_to: none | ||
| version: 0.1.0 |
There was a problem hiding this comment.
If this is publish: none, should it also have a -dev version number?
There was a problem hiding this comment.
it should not have version number at all
deleted here and in other places
| @@ -1 +0,0 @@ | |||
| submodules/JSON-Schema-Test-Suite/** | |||
There was a problem hiding this comment.
If you remove this, then the test suite will be re-published with the package, and that's not our code. It will also make the package a lot bigger, and it's not data that we need to publish.
Don't we need to keep this?
There was a problem hiding this comment.
reverted
thank you!
Co-authored-by: Greg Spencer <gspencergoog@users.noreply.github.com>
|
|
||
| ## About `resolution: workspace` | ||
|
|
||
| `resolution: workspace` in a `pubspec.yaml` is a tooling concern and it does **not** by itself imply anything about release cadence: |
There was a problem hiding this comment.
Why is it a "concern"? That implies that we don't really want to use it. Or do you mean that it only is something for the tooling to worry about?
There was a problem hiding this comment.
good catch
resolved
|
|
||
| 1.2. The package's changes touch only non-publishable code or docs (like tests, tools, or not-publishable docs). | ||
|
|
||
| You can publish `-dev<number>` versions, if you need it for development. |
There was a problem hiding this comment.
I don't see a description of the format of <number> in the -dev<number> suffix.
Yes, user expects to see it here. Moved here from above. |
Co-authored-by: Greg Spencer <gspencergoog@users.noreply.github.com>
Contributes to google/A2UI#1383.
Prerequisite: #926