-
Notifications
You must be signed in to change notification settings - Fork 56
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] Use Pub Workspaces #1884
base: main
Are you sure you want to change the base?
Conversation
@dcharkes The ## Pin ffigen version because we are depending on internal APIs.
ffigen: 8.0.2 But the current ffigen version is Edit: I bumped the dependency in |
Possibly silly question, but does this require a pubspec bump and changelog addition? |
I tried running $ dart tool\generate_ffi_bindings.dart
INFO: Generating C wrappers
Unknown type ffi.UnsignedInt for return type I tracked that down to these lines in String jValueGetterOf(String returnType) {
const getters = {
'jboolean': 'z',
'jbyte': 'b',
'jshort': 's',
'jchar': 'c',
'jint': 'i',
'jsize': 'i', // jsize is an alias to jint
'jfloat': 'f',
'jlong': 'j',
'jdouble': 'd',
'jobject': 'l',
'jweak': 'l',
'jarray': 'l',
'jstring': 'l',
'jthrowable': 'l',
};
if (!getters.containsKey(returnType)) {
stderr.writeln('Unknown type $returnType for return type');
exit(1);
}
return getters[returnType]!;
} Seems it's expecting some Java-y value and is getting a C-ish value instead. Any idea why this is happening? And should I be fixing it in this PR? I'm concerned it happened due to changing the version of |
Thanks a ton @Levi-Lesches! 🚀
@mosuem Do we need a bump in the ecosystem repo to use the newest version of
🔥 😄 |
(They just released version 0.20.2 with the fix, and firehose picked it up automatically)
Kinda confused here, since some of these packages are not |
Yet another CI issue: Testing PathNotFoundException: Cannot open file, path = 'D:\a\native\native\pkgs\native_assets_cli\example\build\native_add_app\.dart_tool\package_config.json' (OS Error: The system cannot find the file specified. That's because the static Future<PackageLayout> fromRootPackageRoot(
FileSystem fileSystem,
Uri rootPackageRoot,
) async {
rootPackageRoot = rootPackageRoot.normalizePath();
final packageConfigUri =
rootPackageRoot.resolve('.dart_tool/package_config.json'); // <--
assert(await fileSystem.file(packageConfigUri).exists());
final packageConfig = await loadPackageConfigUri(packageConfigUri);
return PackageLayout._(
fileSystem, rootPackageRoot, packageConfig, packageConfigUri);
} |
Also, it seems that
|
Package publishing
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
I've dove into this. It's because we don't properly pass the The same issue exists for the check if the native assets experiment should be enabled or not. It currently also looks at all packages in the package graph. Before pub workspaces, if we didn't pass I'm going to fix this behavior in |
Sounds good. And I found this in the firehose checks: Running `/opt/hostedtoolcache/dart/3.7.0-309.0.dev/x64/bin/dart pub global activate -sgit https://github.com/bmw-tech/dart_apitool.git --git-ref 123049d3fa3c1459a5129b2b61d852a388a8511e` in /home/runner/work/native/native/current_repo So there probably needs to be an update there to use the latest |
Re: firehose, dart_apitool version is set here https://github.com/dart-lang/ecosystem/blob/94b4cea02f2948432a1c9218c573cc03d5ef144c/pkgs/firehose/lib/src/health/health.dart#L20C22-L20C62. I will file a PR to update it! |
Filed dart-lang/ecosystem#338 Edit: merged. |
|
@HosseinYousefi I fixed as much as I could, see the diff here. The issue now is that I get $ dart tool\generate_ffi_bindings.dart
INFO: Generating C wrappers
Unknown type ffi.UnsignedInt for return type And I described some more details in #1884 (comment) |
I will try to fix this part of your PR on Monday. Thanks! |
Added a commit that fixes package:jni issues. |
Fixed merge conflicts with the new native_assets changes -- if that's working, can we run CI again? |
@Levi-Lesches The Dart version containing the fixes is https://github.com/dart-lang/sdk/releases/tag/3.8.0-28.0.dev. The next dart dev release (Tuesday next week), should contain the fixes. The Flutter master channel contains the fixes for Once Dart in Flutter rolls to 28.0.dev you should be able to rebase this PR (assuming all the GitHub actions will be using flutter master, and not Dart dev). (Sorry for the merge mess, I had to release a new version of every package, so all pubspecs now have merge conflicts. 😄 ) |
Sounds good!
At first I was confused how it got this bad, but then I realized I've never seen a workflow where in order to merge a PR, you must first merge parts of it, flag it for release, wait for the release to come out, then let CI run and hit merge 😂. I'll try to remember about this in a week, but if I don't, feel free to ping me! |
Yeah, we're building Dart with Dart. (Where Dart and Dart are different versions of Dart.) 🤓 |
Friendly ping @Levi-Lesches! It would be good split up this PR in separate PRs in which the last one introduces the pub workspace. This would (1) enable us to review separate aspects separately, and (2) land those separate aspects separately (avoiding any future merge issues with these changes 😄 ).
Then the actual flipping to a pub workspace (with the remaining github workflow) changes will possibly need some more iteration:
Landing all the prerequisite changes first, will make it easier for me to experiment with what's the right solution. (I would really like one workspace, so that we have one set of lints, one set of dependencies etc!) |
Closes #1223
TODO:
native_assets_builder/test_data/*
still works withdart pub get
native_assets_cli/example/*
still works withdart pub get
dart analyze
passes at the workspace level`analysis_options.yaml
into workspaceLeaving these packages unmigrated:
jnigen/android_test_runner
native_assets_builder/test_data/native_add_version_skew
Blocked by:
package:firehose
needs to usepackage:dart_apitool: ^0.20.2
Contribution guidelines:
dart format
.Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.