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

Pass a parameter for Flutter firehose support #158

Merged
merged 2 commits into from
Sep 1, 2023
Merged

Conversation

mosuem
Copy link
Member

@mosuem mosuem commented Aug 31, 2023

Instead of detecting whether a package relies on Flutter by parsing the pubspec, let the user set this via a flag.

Pros:

  • We need the flag anyhow to decide whether to setup Flutter in the first place
  • Easy to implement and understand

Cons:

  • The user has to set a flag for all packages in the repo

Alternatives:

  • Run dart pub get and parse the .dart_tool/package_config.json "packages" key. I don't know if running dart pub get in a Flutter repo would have negative effects.

  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

@github-actions github-actions bot added package:firehose type-infra A repository infrastructure change or enhancement labels Aug 31, 2023
@github-actions
Copy link

Package publishing

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

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

@github-actions
Copy link

PR Health

Package publish validation ✔️

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

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

License Headers ✔️

Details
// Copyright (c) 2023, 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.

Changelog Entry ❗

Details
Package Changed Files
package:firehose pkgs/firehose/bin/firehose.dart
pkgs/firehose/lib/firehose.dart
pkgs/firehose/lib/src/health/health.dart

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

This check can be disabled by tagging the PR with skip-changelog-check

Coverage ⚠️

Details
File Coverage
pkgs/firehose/bin/firehose.dart 💔 Not covered
pkgs/firehose/lib/firehose.dart 💔 Not covered
pkgs/firehose/lib/src/health/health.dart 💔 Not covered

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

This check can be disabled by tagging the PR with skip-coverage-check

Copy link
Member

@HosseinYousefi HosseinYousefi 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 @mosuem!

@HosseinYousefi HosseinYousefi merged commit 8743a9d into main Sep 1, 2023
17 checks passed
@HosseinYousefi HosseinYousefi deleted the fixFlutterAgain branch September 1, 2023 10:03
@jonasfj
Copy link
Member

jonasfj commented Sep 1, 2023

I think this is a breaking change!

Tools repo has:
https://github.com/dart-lang/tools/blob/main/.github/workflows/publish.yaml

which has:

run: dart pub global run firehose --publish --use-flutter ${{ inputs.use-flutter }}

So it has --use-flutter false which is interpreted as --use-flutter and argument false.
It looks like arguments are silently ignored, so now it'll treat that as --use-flutter.

Where as when it's a flag the workflow should have said --no-use-flutter to negate the flag.

Point being publishing flow fails:
https://github.com/dart-lang/tools/actions/runs/6052409488/job/16425845592

@jonasfj
Copy link
Member

jonasfj commented Sep 1, 2023

Maybe just fix: https://github.com/dart-lang/tools/blob/main/.github/workflows/publish.yaml

I don't know how widely firehose is used 🤣

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

Successfully merging this pull request may close these issues.

3 participants