-
Notifications
You must be signed in to change notification settings - Fork 68
[jni] Upgrade package:jni's ffigen #1954
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
Conversation
PR HealthBreaking changes ✔️
API leaks
|
Package | Leaked API symbols |
---|---|
jni | _ReferenceType _opaque_pthread_mutex_t _opaque_pthread_cond_t _Dart_FinalizableHandle |
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/objective_c/lib/src/ns_input_stream.dart |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the pub workspace, JNIgen will always depend on the same commit, so I believe it should be a path dependency. (And we should run some sanity check on the FFIgen workflow to see that we didn't break JNIgen.)
Thanks @HosseinYousefi! 🙏
I think I had jni as a path dev-dependency of jnigen (to use in tests) and @mosuem changed it to be a normal dependency (and added the jni path dependency as an override instead). I don't remember why this was needed but I wanted to tag him here as well. |
Yes, this is so that people (or in the case which triggered that, tool) which get a package from |
A dev dependency should technically not stop compilation, however there are currently no way to only fetch deps (dart-lang/pub#2036) Any tool could modify the pubspec to remove dev deps altogether before running though. |
Or we can have a valid pubspec to begin with ;) |
It IS a valid pubspec :) dev-deps will not be included in the runtime of the package. |
The failed test is not due to the current change. Merging... |
Ah, when we flip to a pub workspace, this should actually be solved right. (We need to flip the path dependencies to published dependencies in the native_xxx packages as well in order to be able to publish. Then within the workspace it should work as a path dependency, but if you simply pub-get JNIgen you'd pull in the FFIgen from pub. So this is something we can only do once we actually convert this repo to a workspace. 👍 |
Cherry-picked from #1884