Skip to content

[hooks] Run link hooks in order #2417

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

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

[hooks] Run link hooks in order #2417

wants to merge 16 commits into from

Conversation

mosuem
Copy link
Member

@mosuem mosuem commented Jul 16, 2025

Fixes #2381

Seems to work: https://dart-review.googlesource.com/c/sdk/+/441201


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

Copy link

github-actions bot commented Jul 16, 2025

PR Health

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
code_assets Breaking 0.19.4 0.20.0 0.20.0 ✔️
data_assets Breaking 0.19.1 0.20.0 0.20.0 ✔️
hooks Breaking 0.19.5 0.20.0 0.20.0 ✔️
hooks_runner Breaking 0.21.0 0.22.0 0.22.0 ✔️
native_toolchain_c Breaking 0.17.0 0.18.0 0.18.0 ✔️
Changelog Entry ✔️
Package Changed Files

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

API leaks ⚠️

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
hooks MetadataAsset
LinkOutputMetadataBuilder

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

License Headers ✔️
// Copyright (c) 2025, 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.

Unrelated files missing license headers
Files
pkgs/jni/lib/src/third_party/generated_bindings.dart
pkgs/native_doc_dartifier/lib/native_doc_dartifier.dart
pkgs/native_doc_dartifier/lib/src/native_doc_dartifier_base.dart
pkgs/objective_c/lib/src/ns_input_stream.dart

@mosuem mosuem force-pushed the runLinkHooksInOrder branch from 89d0f4f to 031f3ee Compare July 17, 2025 08:20
@coveralls
Copy link

coveralls commented Jul 17, 2025

Coverage Status

coverage: 78.317% (-4.2%) from 82.506%
when pulling dcb8368 on runLinkHooksInOrder
into ccbd88a on main.

@@ -261,6 +267,18 @@
]
},
"LinkOutput": {
"type": "object",
"properties": {
"assets_for_link": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be moved to the HookOutput not duplicated between LinkOutput and BuildOutput.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I was thinking about that, and I am unsure if this is more of a spurious correlation or not. These are different things in principle which just happen to have the same structure. I am more in favor of keeping it this way.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I feel they are kind of similar, also in the LinkInput they should show up as similar/parallel assetsFromBuid assetsFromLink.

@mosuem mosuem changed the title Run link hooks in order [hooks] Run link hooks in order Jul 18, 2025
Copy link

Package publishing

Package Version Status Publish tag (post-merge)
package:code_assets 0.20.0 ready to publish code_assets-v0.20.0
package:data_assets 0.20.0 ready to publish data_assets-v0.20.0
package:ffi 2.1.5-wip WIP (no publish necessary)
package:hooks 0.20.0 ready to publish hooks-v0.20.0
package:hooks_runner 0.22.0 ready to publish hooks_runner-v0.22.0
package:native_doc_dartifier 0.0.1-pre already published at pub.dev
package:native_toolchain_c 0.18.0 ready to publish native_toolchain_c-v0.18.0
package:swift2objc 0.0.1-wip WIP (no publish necessary)
package:swiftgen 0.0.1-wip WIP (no publish necessary)

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

@mosuem mosuem requested a review from dcharkes July 18, 2025 12:37
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.

[hooks] Sending tree-shaking info between link hooks
3 participants