-
Notifications
You must be signed in to change notification settings - Fork 50
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
Move core ObjC classes into their own library #430
Comments
We'll likely need to convert this repo to a monorepo (similar to JNIgen), that's a better approach than a new repo. JNIgen also has a helper library We should try to do that conversion at a point where not a ton of PRs are outstanding. |
This would also solve the pain point I've had when creating this issue: #432 - although the issues are not the same, anything to get rid of those MiB of generated code would be nice. |
Now seems to be the right time then :D |
cc @devoncarew any concerns about converting this repo to a monorepo? The helper package with code that the FFIgen generated could would import should be called:
cc @mit-mit for package name inspiration. |
None, but consider also moving this into dart-lang/native. And, +1 to the package names qualifed w/ ffi prefixes ( |
My reservation with moving FFIgen (and then probably also package:ffi, JNIgen and package:jni) all to dart-lang/native is that all issues will be in one big issue tracker. cc @HosseinYousefi @mannprerak2 @liamappelbe @brianquinlan as most impacted workflow-wise. |
I like the idea of having all the native stuff in
This can be solved using a tag for each package. |
That's a drawback for sure, but I think the cost of doing business; we do get real economies of scale from monorepos. Here's an example of issues for a mono-repo; we just make sure that each package has an issue template, so all filed issues up up w/ a label to help categorize them: https://github.com/dart-lang/tools/issues. |
I'm also in favour of a |
Okay! The process of merging a (non-mono) repo into dart-lang/native can be found here: dart-lang/tools#100. @liamappelbe could you follow these steps for the FFIgen repo and make a PR in the same style? |
I'm starting work on this now. Gonna call it |
How about:
I don't see many guidelines for package names (besides https://dart.dev/tools/linter-rules/package_names). |
How will the package be imported? Will the user have to import it, or will Could it be a separate libraries of |
The latter. (It is similar to
It could. However, I am slightly worried about breaking changes. Objective C support is still experimental. Edit: Especially a package which is used in conjunction with a code generator, it is quite common to change the pattern of the generated code. |
Which means that the code using In that case, I think it's better to put the files inside The breaking change for experimental code is an issue, but that should end eventually. Could you just mark the library as If we expect breaking changes post experiment stage, then linking things that evolve independently is an issue, since it can introduce too many major-version increments. Then separate packages is probably the right thing. In that case, I'd go with |
JNI is already "Java native interface", so it is inherently FFI related. If it was
I believe tools such as https://pub.dev/packages/dart_apitool have poor support for marking some libraries in a package as experimental and ignoring breaking changes. So this would constantly turn our CI red. Maybe we should go for |
Having
I would personally expect that based on my experience.
It can be used by itself. We have a The thing about
Am I the only one who doesn't really mind not directly implying the fact that these packages are |
Definitely. My experience has been that generated code changes more often and more drastically than normal code. Based on everyone's feedback, I'm leaning towards |
👍
I'd prefer |
I like As @lrhn said:
And I think it can be used directly. |
Fair enough. @dcharkes any objections to |
sgtm! |
For example
NSObject
andNSString
. This makes sense from a modularisation perspective, and also solves the problem where 2 different code genned ObjC libraries are incompatible.The text was updated successfully, but these errors were encountered: