Skip to content
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

support nested packages in firehose #277

Merged
merged 5 commits into from
Jul 2, 2024
Merged

Conversation

jakemac53
Copy link
Contributor

@jakemac53 jakemac53 commented Jul 1, 2024

Fixes #276

Adds support for published packages nested under unpublished packages. In particular, this adds support for workspace packages to firehose.

I need to add a test still, will do that before landing. The easiest way would be to migrate to using workspaces in this package, otherwise I will need to create test fixtures to mimic a workspace repo. @devoncarew any opposition to migrating this repo to use workspaces, or would you prefer an explicit test for that setup? The current test just uses the current repo as a test fixture. tests added

Copy link

github-actions bot commented Jul 1, 2024

Package publishing

Package Version Status Publish tag (post-merge)
package:firehose 0.9.1 ready to publish firehose-v0.9.1
package:dart_flutter_team_lints 3.1.0 already published at pub.dev

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

Copy link

github-actions bot commented Jul 1, 2024

PR Health

Breaking changes ✔️

Details
Package Change Current Version New Version Needed Version Looking good?
firehose None 0.9.0 0.9.1 0.9.0 ✔️

Changelog Entry ✔️

Details
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

Coverage ✔️

Details
File Coverage
pkgs/firehose/lib/src/repo.dart 💚 93 %

This check for test coverage is informational (issues shown here will not fail the PR).

API leaks ✔️

Details

The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.

Package Leaked API symbols

License Headers ✔️

Details
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files
no missing headers

All source files should start with a license header.

Package publish validation ✔️

Details
Package Version Status
package:firehose 0.9.1 ready to publish
package:dart_flutter_team_lints 3.1.0 already published at pub.dev

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

@jakemac53
Copy link
Contributor Author

I will go ahead and just add a test fixture for now, shouldn't be too bad

@jakemac53
Copy link
Contributor Author

cc @sigurdm @jonasfj as well just for FYI, not sure if firehouse was on your radar

Copy link
Member

@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.

lgtm, thanks!

The easiest way would be to migrate to using workspaces in this package

My understanding is that the workspace feature was designed to support a single solve amongst all workspace packages. That would make sense for some mono-repos but not others (for instance, not this repo, which is a more heterogeneous mix of packages).

pkgs/firehose/lib/src/repo.dart Show resolved Hide resolved
pkgs/firehose/CHANGELOG.md Outdated Show resolved Hide resolved
pkgs/firehose/CHANGELOG.md Outdated Show resolved Hide resolved
@jakemac53
Copy link
Contributor Author

My understanding is that the workspace feature was designed to support a single solve amongst all workspace packages. That would make sense for some mono-repos but not others (for instance, not this repo, which is a more heterogeneous mix of packages).

Fwiw, while I agree it might not be an intuitive fit, the workflow overall fits really any mono_repo quite well and provides development improvements regardless:

  • Only need to do a single pub get for the whole repo, easier to get started and also for maintenance.
  • Fewer analysis contexts means less memory, and more efficient analyzer in general.
  • Better support for includes in shared analysis_options.yaml files. You don't need to remember to add the dep into every single package.

If you can't share a version solve for some reason (which should be rare), you can easily opt out individual packages from the workspace.

The downsides I am aware of are:

  • Implicit path dependency on all workspace packages may not be what you want.
  • Have to upgrade dependencies across the entire repo at once (although, you can work around this by temporarily opting out packages from the workspace).

But, just a thought :). In general, I do find the workflow to be a lot nicer personally.

Co-authored-by: Devon Carew <devoncarew@google.com>
@jakemac53 jakemac53 merged commit 4171189 into main Jul 2, 2024
27 checks passed
@jakemac53 jakemac53 deleted the support-nested-packages branch July 2, 2024 18:54
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Jul 8, 2024
…em, file, glob, http, http_multi_server, http_parser, json_rpc_2, logging, mockito, package_config, source_maps, source_span, sync_http, test, yaml_edit

Revisions updated by `dart tools/rev_sdk_deps.dart`.

args (https://github.com/dart-lang/args/compare/6a5a2e6..1a24d61):
  1a24d61  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/args#278)

bazel_worker (https://github.com/dart-lang/bazel_worker/compare/c76d7c8..02f190b):
  02f190b  2024-07-01  Kevin Moore  blast_repo fixes (dart-lang/bazel_worker#94)

benchmark_harness (https://github.com/dart-lang/benchmark_harness/compare/f6ef33d..a06785c):
  a06785c  2024-07-01  Kevin Moore  blast_repo fixes (dart-lang/benchmark_harness#108)

collection (https://github.com/dart-lang/collection/compare/9354f38..0c1f829):
  0c1f829  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/collection#354)

ecosystem (https://github.com/dart-lang/ecosystem/compare/54ca01a..4171189):
  4171189  2024-07-02  Jacob MacDonald  support nested packages in firehose (dart-lang/ecosystem#277)
  459041b  2024-07-01  dependabot[bot]  Bump the github-actions group with 4 updates (dart-lang/ecosystem#275)

file (https://github.com/google/file.dart/compare/07cacae..855831c):
  855831c  2024-07-01  dependabot[bot]  Bump actions/checkout from 4.1.6 to 4.1.7 (google/file.dart#242)
  da79121  2024-07-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.4 to 1.6.5 (google/file.dart#241)

glob (https://github.com/dart-lang/glob/compare/6d3ba5e..8b05be8):
  8b05be8  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/glob#96)

http (https://github.com/dart-lang/http/compare/8d89385..4178b67):
  4178b67  2024-07-03  Brian Quinlan  Clarify when Client.close must be called (dart-lang/http#1255)
  719dc5f  2024-07-02  Brian Quinlan  Upgrade to http_image_provider: 0.0.3 (dart-lang/http#1253)
  75b1efb  2024-07-02  dependabot[bot]  Bump the github-actions group across 1 directory with 4 updates (dart-lang/http#1251)
  cdfb94c  2024-07-01  Brian Quinlan  Add an section explaining the benefits of using `package:ok_http`. (dart-lang/http#1252)

http_multi_server (https://github.com/dart-lang/http_multi_server/compare/25941e2..8348be1):
  8348be1  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/http_multi_server#71)

http_parser (https://github.com/dart-lang/http_parser/compare/9bf7bd9..ce528cf):
  ce528cf  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/http_parser#101)

json_rpc_2 (https://github.com/dart-lang/json_rpc_2/compare/616937f..b4810dc):
  b4810dc  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/json_rpc_2#117)

logging (https://github.com/dart-lang/logging/compare/6c3fb37..8752902):
  8752902  2024-07-01  Kevin Moore  blast_repo fixes (dart-lang/logging#170)

mockito (https://github.com/dart-lang/mockito/compare/a7fdf71..eb4d1da):
  eb4d1da  2024-07-03  James Lin  Update with review feedback from srawlins
  db19e8c  2024-06-05  James Lin  Provide better documentation for `provideDummy`/`provideDummyBuilder`
  330976e  2024-07-01  dependabot[bot]  Bump the github-actions group across 1 directory with 2 updates (dart-lang/mockito#761)

package_config (https://github.com/dart-lang/package_config/compare/903a0e5..f0b7256):
  f0b7256  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/package_config#156)

source_maps (https://github.com/dart-lang/source_maps/compare/caa79c2..5f82c61):
  5f82c61  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/source_maps#95)

source_span (https://github.com/dart-lang/source_span/compare/89520f3..f81cd4a):
  f81cd4a  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/source_span#115)

sync_http (https://github.com/dart-lang/sync_http/compare/7622bdd..ab8377e):
  ab8377e  2024-07-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.2 to 1.6.5 (google/sync_http.dart#48)

test (https://github.com/dart-lang/test/compare/3256c23..14f9b3e):
  14f9b3ec  2024-07-08  Jacob MacDonald  use pub workspaces (dart-lang/test#2249)
  c14ce93a  2024-07-03  Nate Bosch  Prepare to publish (dart-lang/test#2250)

yaml_edit (https://github.com/dart-lang/yaml_edit/compare/57a28da..d605cce):
  d605cce  2024-07-04  Kavisi  Fix fold literal encoding with trailing line break (dart-lang/yaml_edit#91)

Change-Id: I70ee32b3fa1912457b7b08affb3446523ef3b0d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/374860
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

auto publishing doesn't work with pub workspaces
2 participants