Skip to content

feat: Add package version constraints for all dependencies#3396

Merged
coryan merged 5 commits intogoogleapis:mainfrom
brianquinlan:version_constaints
Sep 24, 2025
Merged

feat: Add package version constraints for all dependencies#3396
coryan merged 5 commits intogoogleapis:mainfrom
brianquinlan:version_constaints

Conversation

@brianquinlan
Copy link
Copy Markdown
Contributor

No description provided.

@coryan
Copy link
Copy Markdown
Collaborator

coryan commented Sep 24, 2025

I suspect you will want to change this:

run: go run github.com/googleapis/librarian/cmd/[email protected] refreshall -project-root dart

To use the version found with:

go list -m -u -f '{{.Version}}' github.com/googleapis/librarian@main

It also looks like a taplo fmt dart/.sidekick.toml may help.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.19%. Comparing base (afbb404) to head (a37dc4e).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3396   +/-   ##
=======================================
  Coverage   96.19%   96.19%           
=======================================
  Files         115      115           
  Lines        4573     4573           
=======================================
  Hits         4399     4399           
  Misses        174      174           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@brianquinlan brianquinlan changed the title feat: Update Dart with latest sidekick feat: Add package version constraints for all dependencies Sep 24, 2025
@brianquinlan
Copy link
Copy Markdown
Contributor Author

I suspect you will want to change this:

run: go run github.com/googleapis/librarian/cmd/[email protected] refreshall -project-root dart

To use the version found with:

go list -m -u -f '{{.Version}}' github.com/googleapis/librarian@main

I don't care that the generated code is out-of-date, I just want the configuration to be correct for googleapis/librarian#2331

It also looks like a taplo fmt dart/.sidekick.toml may help.

Done.

@brianquinlan
Copy link
Copy Markdown
Contributor Author

@devoncarew

Copy link
Copy Markdown
Contributor

@devoncarew devoncarew left a comment

Choose a reason for hiding this comment

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

Did you mean to include the LICENSE files as well?

'package:google_cloud_gax' = '^0.1.0'
'package:http' = '^1.3.0'

# Generated packages
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I assume these are the ones that are currently referenced by other (generated) packages.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes. Maybe

Suggested change
# Generated packages
# Generated packages used as dependencies.

?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm fine w/ either, I was just confirming this for my own understanding.

@brianquinlan
Copy link
Copy Markdown
Contributor Author

Did you mean to include the LICENSE files as well?

For the CI to pass, I had to re-run the generator, which produced the LICENSE files.

@coryan
Copy link
Copy Markdown
Collaborator

coryan commented Sep 24, 2025

Did you mean to include the LICENSE files as well?

For the CI to pass, I had to re-run the generator, which produced the LICENSE files.

It did not occur to me earlier, but you could change the CI build to skip checking of the LICENSE files. The CI scripts are right here in this repo.

@brianquinlan
Copy link
Copy Markdown
Contributor Author

Did you mean to include the LICENSE files as well?

For the CI to pass, I had to re-run the generator, which produced the LICENSE files.

It did not occur to me earlier, but you could change the CI build to skip checking of the LICENSE files. The CI scripts are right here in this repo.

Since the LICENSE files are generated, shouldn't they be checked just like everything else?

Hopefully this will be the last time that we need to update this code before we have a separate repo for dart but isn't the idea that no checkins should be allowed where the generated code doesn't match that produced by the CI?

@coryan
Copy link
Copy Markdown
Collaborator

coryan commented Sep 24, 2025

/gcbrun

@coryan
Copy link
Copy Markdown
Collaborator

coryan commented Sep 24, 2025

Since the LICENSE files are generated, shouldn't they be checked just like everything else?

Yes, you are right. Forget what I said.

@coryan coryan merged commit a9905c6 into googleapis:main Sep 24, 2025
25 checks passed
@brianquinlan brianquinlan deleted the version_constaints branch September 24, 2025 20:55
brianquinlan added a commit to googleapis/librarian that referenced this pull request Sep 24, 2025
ldetmer pushed a commit to googleapis/librarian that referenced this pull request Sep 26, 2025
Librarian Version: v0.0.0-20250925031739-cb21cf1ae8af
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/librarian-release-container:latest
<details><summary>librarian: 0.3.0</summary>

##
[0.3.0](v0.2.0...v0.3.0)
(2025-09-25)

### Features

* discovery-based APIs and pagination (#2350)
([cb21cf1](cb21cf1))

* Make generated `ProtoMessage` and `ProtoEnum` classes `final` (#2349)
([7d0520b](7d0520b))

* Require that all imports have a version contraints (#2331) Fixes #1989

This should not be landed before
googleapis/google-cloud-rust#3396
([00828d5](00828d5))

* Generate samples for single value setters (#2263)
([f7c0b84](f7c0b84))

* discovery doc arrays (#2337)
([da69195](da69195))

* Inject InstrumentationClientInfo for tracing (#2252) - Add static
INSTRUMENTATION_CLIENT_INFO to lib.rs.mustache.
- Use INSTRUMENTATION_CLIENT_INFO in transport.rs.mustache if tracing is
enabled.

For #2212 see also
googleapis/google-cloud-rust#3347 and
googleapis/google-cloud-rust#3376
([1358226](1358226))

* parse most object fields (#2318) Parse most fields of object in a
discovery doc. Fields with an inline
type definition still need some custom work.
([f2d1a10](f2d1a10))

* Add the ability to insert text after the package title (#2323) The
current use case for this is to advise users of equivalent Firebase
packages. For example:

```toml
readme-after-title-text = &#34;&#34;&#34;&gt; [!TIP]
&gt; Flutter applications should use [Firebase AI Logic](https://firebase.google.com/products/firebase-ai-logic).
&gt;
&gt; The Generate Language API is meant for Dart desktop and cloud applications.
&gt; Firebase AI Logic provides client-side access to both the Gemini Developer
&gt; API and Vertex AI. &#34;&#34;&#34;
```

Which results in a README.md that looks like:

&lt;img width=&#34;1485&#34; height=&#34;909&#34; alt=&#34;image&#34;

src=&#34;https://github.com/user-attachments/assets/a1c9120e-eafd-4394-9562-48c595ab4960&#34;
/&gt;
([756e72f](756e72f))

### Bug Fixes

* read version from version.txt file (#2347) Fixes #2348

Moves version.txt to the `internal/cli` package so it can be read by the
`embed` package as a variable.
When constructing the synthetic version number, use this release version
as the base.
([014b5f4](014b5f4))

* race condition in createWorkRoot() (#2338) Creating a temporary
directory based on a timestamp is inherently racy.
Use the standard functions to create temporary directories, and relax
the tests to check for what matters.
([46428ca](46428ca))

* parse github remote from local directory (#2328) Fixes #2327
([1c71bd9](1c71bd9))

</details>
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