dart-lang / dart-lang/native

[infra] Convert this mono_repo to use pub workspaces

Open
#1,223 7 comments 3 reactions 0 assignees View on GitHub
type-infra
Dominant language
Dart
Stars
275
Forks
144
Avg merge
2d 10h
Merged PRs (30d)
47

Description

**Edit 2025-12-15: The hooks-related packages are a pub workspace. Now that hooks are stable and `package:objective_c` is using hooks, we should add FFIgen and objective_c to the workspace as well. `package:jni` cannot be added yet due to Flutter dependency due to having to bundle Java code.**

* [ ] https://github.com/dart-lang/native/issues/2861

--------------------------

From Dart 3.5 on, `pub` supports single resolution for related packages.

* https://flutter.dev/go/pub-workspace

This would be very useful for:

* `native_assets_cli`
* `native_assets_builder`
* `native_toolchain_c`

We can get rid of all the path dependencies / overrides.

Also, having a single resolution ensures that `package:jni` for example doesn't have any dependency conflicts with `package:native_assets_cli`.

It might be a slight over-specification to have _all_ packages in this repo as a single resolution, and it would mean bumping major versions needs to be done in PRs that touch all packages. But that might be a small price to pay.

We have to wait until Dart 3.5 reaches stable, the SDK constraint for the packages must be at least 3.5, and we don't want to push the packages to only work on beta/dev.

Thanks for the great work @sigurdm! ❤️

FYI @HosseinYousefi @liamappelbe @mosuem

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.