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

Create package leak_tracker_flutter_testing. #119

Merged
merged 20 commits into from
Aug 10, 2023
Merged

Conversation

polina-c
Copy link
Contributor

@polina-c polina-c commented Aug 8, 2023

This PR is needed to stop copy-pasting leak_tracker for Flutter between flutter and tests for leak_tracker.

Also:
Fixes #78
Fixes #52

@polina-c polina-c marked this pull request as draft August 8, 2023 01:32
@polina-c polina-c marked this pull request as ready for review August 8, 2023 21:36
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.

Several comments! Mostly about updating references where things were renamed / moved, and fleshing out the documentation a bit more.

For a package's readme I think it's useful to assume that the user has no context on a package when they first pull up the pub.dev page; the readme should give them some simple grounding on what the package is, why they may want to use it, and how they'd go about doing that.

.github/workflows/ci.yaml Show resolved Hide resolved
pkgs/leak_tracker_flutter_testing/README.md Outdated Show resolved Hide resolved
pkgs/leak_tracker_flutter_testing/README.md Outdated Show resolved Hide resolved
pkgs/leak_tracker_testing/README.md Outdated Show resolved Hide resolved
pkgs/leak_tracker/README.md Outdated Show resolved Hide resolved
@@ -1,6 +1,18 @@
[![pub package](https://img.shields.io/pub/v/leak_tracker.svg)](https://pub.dev/packages/leak_tracker)
[![package publisher](https://img.shields.io/pub/publisher/leak_tracker.svg)](https://pub.dev/packages/leak_tracker/publisher)

Coming soon!
Coming soon! See https://github.com/flutter/devtools/issues/3951 and https://github.com/flutter/devtools/issues/5606.
Copy link
Member

Choose a reason for hiding this comment

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

I'd move this into a section below - ## Following package development or similar.

Copy link
Contributor Author

@polina-c polina-c Aug 10, 2023

Choose a reason for hiding this comment

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

We do not want to recommend people start using the package yet, because flutter framework contains leaks. I am working on cleaning them. When it is done, I will do what you suggested.

pkgs/leak_tracker/README.md Show resolved Hide resolved
pkgs/leak_tracker_testing/README.md Outdated Show resolved Hide resolved
pkgs/leak_tracker_testing/README.md Outdated Show resolved Hide resolved
pkgs/leak_tracker_flutter_testing/README.md Outdated Show resolved Hide resolved
pkgs/leak_tracker_flutter_testing/README.md Outdated Show resolved Hide resolved
pkgs/leak_tracker_flutter_testing/README.md Outdated Show resolved Hide resolved
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.

One question about the maturity that we want to message for package:leak_tracker_flutter_testing.

@@ -0,0 +1,23 @@
name: leak_tracker_flutter_testing
version: 1.0.0
Copy link
Member

Choose a reason for hiding this comment

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

Are the apis stable or do we expect additional iteration as we explore the space? I ask because we message that the leak_tracker package itself is ~alpha level, however we've published 9 major stable versions of it. In hindsight, we should have started with an 0.1 version there and evolved from that.

If we know that the API is going to evolve before we're comfortable calling it stable than we should start with a pre-release (0.x) version. If we think that the API is stable - and looks like what we'd invite people to consume - then we could start with a 1.0.

pkgs/leak_tracker_testing/README.md Outdated Show resolved Hide resolved

First, [understand leak tracking concepts](https://github.com/dart-lang/leak_tracker/blob/main/doc/CONCEPTS.md).

TODO(polina-c): add usage information.
Copy link
Member

Choose a reason for hiding this comment

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

This todo will be what people see when they visit the package on pub.dev - this will be part of the public docs of the package.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I want people to see that this is still under construction and after stabilization this information will be added.

@@ -0,0 +1,23 @@
name: leak_tracker_flutter_testing
version: 1.0.0
Copy link
Member

Choose a reason for hiding this comment

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

Another way to put it - the package version is a way to message the maturity of the package.

@polina-c
Copy link
Contributor Author

Are the apis stable or do we expect additional iteration as we explore the space? I ask because we message that the leak_tracker package itself is ~alpha level, however we've published 9 major stable versions of it. In hindsight, we should have started with an 0.1 version there and evolved from that.

If we know that the API is going to evolve before we're comfortable calling it stable than we should start with a pre-release (0.x) version. If we think that the API is stable - and looks like what we'd invite people to consume - then we could start with a 1.0.

I increase major version because of breaking changes.

At the moment the API is stable enough for Flutter Framework to use it as dev_dependency.
But the Flutter itself is not clean enough to recommend this package for users. And, as we clean up flutter,
we learn, and change API to handle leak tracking better.

That's why the packages are unlisted and we say everywhere that leak tracker is under construction.

Does it help?

@polina-c polina-c merged commit 19b01cf into dart-lang:main Aug 10, 2023
2 checks passed
@polina-c polina-c deleted the next branch August 10, 2023 21:03
@devoncarew
Copy link
Member

Are the apis stable or do we expect additional iteration as we explore the space? I ask because we message that the leak_tracker package itself is ~alpha level, however we've published 9 major stable versions of it. In hindsight, we should have started with an 0.1 version there and evolved from that.
If we know that the API is going to evolve before we're comfortable calling it stable than we should start with a pre-release (0.x) version. If we think that the API is stable - and looks like what we'd invite people to consume - then we could start with a 1.0.

I increase major version because of breaking changes.

At the moment the API is stable enough for Flutter Framework to use it as dev_dependency. But the Flutter itself is not clean enough to recommend this package for users. And, as we clean up flutter, we learn, and change API to handle leak tracking better.

That's why the packages are unlisted and we say everywhere that leak tracker is under construction.

Does it help?

We should follow semver here; pre-release packages should use versions < 1.0 (0.1, 0.2, 0.3, ...), rev'ing through their point releases as we make breaking api changes. When we're ready for general consumption - ready to call the package stable - we should then release a 1.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants