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

[native_assets_builder] Support pub workspaces #1911

Merged
merged 3 commits into from
Jan 20, 2025
Merged

Conversation

dcharkes
Copy link
Collaborator

@dcharkes dcharkes commented Jan 17, 2025

Bug: #1905

  • .dart_tool/package_config.json is possibly in a ancestor directory
  • runPackageName argument is now required for build/link hooks.
    • Only native assets that are a dependency are built (instead of all packages in the package resolution of the whole workspace).
    • Don't crash if the root package directory name is not identical to the package name.
  • Native assets are now shared for the whole workspace. (The package resolution is identical, so the native assets should be identical.

Doesn't yet address:

  • runPackageName argument should be required for "if there are packages with native assets", the native assets experiment only has to be enabled if a dependency has a hook. (requires a bigger refactoring)

Copy link

PR Health

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
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
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/objective_c/lib/src/ns_input_stream.dart

@dcharkes dcharkes marked this pull request as ready for review January 17, 2025 16:02
@coveralls
Copy link

coveralls commented Jan 17, 2025

Coverage Status

coverage: 90.538% (-0.09%) from 90.631%
when pulling 1a889f5 on run-package-name
into ba34674 on main.

@dcharkes
Copy link
Collaborator Author

Friendly ping @HosseinYousefi @mosuem

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! Somehow missed it from my inbox. Thanks for the ping!

@dcharkes dcharkes merged commit d1d9aa5 into main Jan 20, 2025
36 checks passed
@dcharkes dcharkes deleted the run-package-name branch January 20, 2025 15:01
@dcharkes
Copy link
Collaborator Author

Merci! 🙏

copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Jan 20, 2025
This CL goes part of the way to support pub workspaces with native
assets.

This CL makes the `runPackageName` explicit in every invocation. This
ensures not too many native assets are built.

Moreover, this CL also makes `packageLayout` explicit, ensuring the
right packages config file is used.

A follow up PR should fix the checks w.r.t. the experiment not being
enabled.

For more info see:
dart-lang/native#1911

TEST=pkg/dartdev/test/native

Change-Id: I3c3123526e320abb8bb094116e58bb4340c4c052
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405141
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
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.

4 participants