-
Notifications
You must be signed in to change notification settings - Fork 78
Merge graphs package #100
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
Merge graphs package #100
Conversation
While implementing crawlAsync I noticed some discrepancies: - Use 'directed' rather than 'ordered' graph - This is a reverse topological sort, not a topolocical sort
Implemented with no ordering guarantees since this is the simplest and likely most performance. Add an example crawing transitive imports since this matches our known use case.
Workaround for dart-lang/sdk#31884 in the dev.17.0 version of the SDK.
Also use `eagerError` and check for alrady closed streams to prune work when there are errors.
Use new analyzer APIs.
- `dartfmt --fix` to drop optional `new`. - Change example to use `whereType`. - Update minimum SDK to one that has Dart 2 semantics by default. - Test on stable. - Update package:test dependency.
Looks like ~10% improvement with dart2js and a ~8% improvement on VM Fixes dart-archive/graphs#25
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@93ea575...755da8c) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.3 to 1.4. - [Release notes](https://github.com/dart-lang/setup-dart/releases) - [Changelog](https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md) - [Commits](dart-lang/setup-dart@6a218f2...a57a6c0) --- updated-dependencies: - dependency-name: dart-lang/setup-dart dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@755da8c...ac59398) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.3.0 to 3.5.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@ac59398...8f4b7f8) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.4.0 to 1.5.0. - [Release notes](https://github.com/dart-lang/setup-dart/releases) - [Changelog](https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md) - [Commits](dart-lang/setup-dart@a57a6c0...d6a63da) --- updated-dependencies: - dependency-name: dart-lang/setup-dart dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.0 to 3.5.2. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@8f4b7f8...8e5e7e5) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This also makes topologicalSort() and stronglyConnectedComponents() iterative rather than recursive, so transitiveClosure() is able to operate on very large graphs.
Use `-` over `*` and avoid extra line breaks for consistency.
dependabot
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Package publishing
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
69a48e4 to
56853d5
Compare
Commits have been rewritten with git-filter-repo to be inside pkgs/graphs/. Tags have been rewritten with git-filter-repo to prefix graph-. Migrated GitHub action workflow. Updated `repository` config and README to use the anticipated URL. Updated CHANGELOG to have ## headings.
56853d5 to
4331e28
Compare
devoncarew
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm for my part
(generally, I wonder if there's any way we can make very very sure that these package-merge PRs don't accidentally get merged in through the github UI)
| @@ -0,0 +1,33 @@ | |||
| Want to contribute? Great! First, read this page (including the small print at | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary for this PR (can be done after its merged in), but we can delete this separate contributing file.
| name: graphs | ||
| version: 2.3.0 | ||
| description: Graph algorithms that operate on graphs in any representation | ||
| repository: https://github.com/dart-lang/tools/tree/main/pkgs/graphs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anytime we make changes to the pubspec file we really should rev the version. Generally, I'd say that we should merge this in unchanged, and then plan to come along later w/ a PR to the tools/ repo that updates this to the correct value and revs the pubspec version.
No concerns however w/o merging this in as is, we should just plan to rev the pubspec after the merge).
I have followed @stuartmorgan's suggestion on the doc to enable merge commits in the repo settings, then merge in the GitHub UI, and then turn that setting off again in the repo setings. The result is two merge commits, one from the
If I would have pushed to This seems to have no effect on |

Do NOT squash merge!
Reasons for merging into dart-lang/tools mono_repo:
Steps taken:
newren $ git clone git@github.com:newren/git-filter-repo.gitgit-filter-repotoPATH.dart-lang $ git clone git@github.com:dart-lang/graphs.gitpkgs/package_name:graphs $ git filter-repo --path-rename :pkgs/graphs/graphs $ git filter-repo --tag-rename :graphs-https://github.com/dart-lang/graphs/actions/workflows/ci.yml->https://github.com/dart-lang/tools/actions/workflows/graphs.ymlhttps://github.com/dart-lang/graphs->https://github.com/dart-lang/tools/tree/main/pkgs/graphsdependabot.yamlwhich is already in the target mono_repo.pkgs/graphs/.github/workflows/ci.yml->.github/workflows/graphs.ymlpathsto theonclauses in the GitHub workflow (example).defaults->run->working-directoryto all jobs in the GitHub workflow (example).tools $ git checkout -b merge-graphs-packagetools $ git remote add graphs_package /Users/dacoharkes/src/dart-lang/graphs/tools $ git fetch graphs_packagetools $ git merge --allow-unrelated-histories graphs_package/master -m "Merge package:graphs into shared tool repository"Current step:
Steps to do:
Tag names after renaming: