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

[infra] Convert this mono_repo to use pub workspaces #1223

Open
dcharkes opened this issue Jun 25, 2024 · 3 comments
Open

[infra] Convert this mono_repo to use pub workspaces #1223

dcharkes opened this issue Jun 25, 2024 · 3 comments
Labels
type-infra A repository infrastructure change or enhancement

Comments

@dcharkes
Copy link
Collaborator

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

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

@dcharkes dcharkes added the type-infra A repository infrastructure change or enhancement label Jun 25, 2024
@dcharkes
Copy link
Collaborator Author

dcharkes commented Jun 25, 2024

We might also need the resolution: local feature (dart-lang/pub#4317), we have some example/test projects with a pubspec.yaml that are intentionally a different resolution:

  • Flutter and non-Flutter test projects.
  • Some example projects that explicitly target published older version of packages in this repo to ensure that version skew doesn't crash things.

@sigurdm What about projects that have sdk: flutter how does that relate to the requirement to have sdk: 3.5.0?

@sigurdm
Copy link

sigurdm commented Jun 25, 2024

What about projects that have sdk: flutter how does that relate to the requirement to have sdk: 3.5.0?

If you have sdk:flutter you need to have a flutter sdk with a dart that includes that specific version.
(You might get away with pointing FLUTTER_ROOT to a flutter repo if you just want to resolve)

@sigurdm
Copy link

sigurdm commented Jun 25, 2024

flutter commands (flutter_tools) still don't support workspaces. We'll have to wait for flutter/flutter#150196

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-infra A repository infrastructure change or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants