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

Remove the use-flutter configuration #284

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

natebosch
Copy link
Member

Always set up the flutter SDK and use flutter pub publish, even for
non-flutter Dart packages. The flutter command can publish non-flutter
packages so no behavior changes are expected during the publish action.

Directly remove the argument, configuration, and all references
immediately. There is no plan for a deprecation/migration phase since
this only impacts CI, and the fix is trivial.

Always set up the flutter SDK and use `flutter pub publish`, even for
non-flutter Dart packages. The `flutter` command can publish non-flutter
packages so no behavior changes are expected during the publish action.

Directly remove the argument, configuration, and all references
immediately. There is no plan for a deprecation/migration phase since
this only impacts CI, and the fix is trivial.
@github-actions github-actions bot added package:firehose type-infra A repository infrastructure change or enhancement labels Aug 7, 2024
Copy link

github-actions bot commented Aug 7, 2024

PR Health

Breaking changes ✔️

Details
Package Change Current Version New Version Needed Version Looking good?
firehose Breaking 0.9.1 0.10.0 0.10.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/firehose.dart 💚 35 %
pkgs/firehose/lib/src/health/health.dart 💚 94 %

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.10.0 ready to publish
package:dart_flutter_team_lints 3.1.1-wip WIP (no publish necessary)

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

- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
if: ${{ !inputs.use-flutter }}
with:
sdk: ${{ inputs.sdk }}

- name: Install firehose
run: dart pub global activate firehose
Copy link
Member Author

Choose a reason for hiding this comment

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

@devoncarew @mosuem Have we made breaking changes to firehose CLI before? How do we handle cases where a repo could be using an older publish.yaml file than what dart pub global activate firehose installs?

Copy link
Member Author

Choose a reason for hiding this comment

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

We recommend using @main, so as long as we publish shortly after landing this on the main branch, I think it should work out for most use cases.

Is it OK if we break configuration that are pinning the publish workflow?

Copy link
Member

Choose a reason for hiding this comment

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

I don't believe we've made breaking CLI changes before.

Repos generally always reference the .github/workflows/publish.yaml script at head (i.e., uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main). That then globally activates firehose - that latest published version. We update the various publish.yaml clients to remove any use of use-flutter, but I don't think we'll have any other work to do.

Copy link
Member

Choose a reason for hiding this comment

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

I think breaks are ok; we should have some good text for the changelog, and likely rev. to a new 'major' version to help call out the change.

The `dart` command and SDK do come with the `flutter` SDK, so it should
be OK to use the flutter SDK for health checks as well.
Copy link

github-actions bot commented Aug 7, 2024

Package publishing

Package Version Status Publish tag (post-merge)
package:firehose 0.10.0 ready to publish firehose-v0.10.0
package:dart_flutter_team_lints 3.1.1-wip WIP (no publish necessary)

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

This will allow backwards compatibility for the few files which are
passing it, and can be removed after they are cleaned up.
@@ -129,9 +129,7 @@ class Health {
};

Future<HealthCheckResult> validateCheck() async {
//TODO: Add Flutter support for PR health checks
Copy link
Member Author

Choose a reason for hiding this comment

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

Most of the uses of use-flutter: were for health checks - and the health check firehose action ignores that.

@natebosch
Copy link
Member Author

  flutter pub publish --dry-run
  ProcessException: No such file or directory
    Command: flutter pub publish --dry-run

I think I broke the ignore_packages argument somehow?

@natebosch
Copy link
Member Author

natebosch commented Aug 7, 2024

Oh, now I see what's happening.

This PR make firehose our first package that is not a flutter package, but requires flutter at runtime for the tests.
We can't make it a real flutter package because that will break compatibility with dart pub global activate.

@kevmoo - we still don't have a general "add extra setup actions" feature in mono_repo do we?

@kevmoo
Copy link
Member

kevmoo commented Aug 7, 2024

@natebosch – I don't think so. It's been soooo long

@mosuem
Copy link
Member

mosuem commented Aug 8, 2024

@natebosch did you test this by flipping some repo using auto-publishing and PR health checks to use-flutter: true? That would be a good smoke test, before shipping this to all users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:firehose skip-do-not-submit-check type-infra A repository infrastructure change or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants