forked from mozilla/uniffi-rs
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add changes for C# 0.28.0 #16
Open
arg0d
wants to merge
295
commits into
main
Choose a base branch
from
kristupas/uniffi-bindgen-cs/0.28.0
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
That module was getting pretty long and I want to add some more functionality to it. Let's split it up into smaller files. This commit just moves things around and renames `ContinuationDataCell` to `Scheduler`.
Docstrings are declared in .udl file by prefixing a line with three slashes ///. Docstrings can be placed basically anywhere - functions, objects, methods, constructors, callbacks, etc.. A docstring placed in a wrong place will generate UDL parser error.
Fixes mozilla#1831 Also fixes naming problem bindings with external types with unusual names.
* test: add docstring tests for proc-macros * feat: support docstrings in metadata * fix(bindgen): improve docstrings in Enums and Errors * chore: add .idea to .gitignore * chore: add changelog entry
Search the path for `bash` vs expecting it at `/bin`.
This fixture is testing the foreign executor code, which isn't actually used in practice. I hope to add similar functionality, but that's probably going to use a new fixture anyways, for example: mozilla@5cabada
I want to fix mozilla#1797 by cloning the object handle in lower(). However, this presents an issue in the dynamic languages because they perform various failable checks in lower(): type checks, bounds checks, etc. If the check fails, then the cloned handle will be leaked. Prevent this by adding a `check()` method. We do the check first then once we get to `lower()`, nothing can fail.
Currently, `lower()` always returns a borrow of the object handle. This is fine for function arguments, since you know the object is still alive on the stack while the function is being called. However, for function returns this is not correct. To fix this: clone the handle in `lower()`. Added a test for this -- it was surprisingly easy to cause a segfault with the current behavior. Removed the reexport-scaffolding-macro fixture which broke and often requires changes when the FFI changes. I don't think it's giving us enough value at this point to justify continuing to update it.
For constructors and other methods that return an object, UniFFI can wrap the object in an `Arc<>` just fine, the library doesn't need to do this. Allowing the library to skip the wrapping can improve ergonomics, especially if we start to allow interfaces as errors.
This avoids pulling in the loom dependency.
Added changelog entry for 0.25.3 and ran `cargo release`
Merge 0.25.3 back to main
This has been long deprecated and was removed in Python 3.12
Remove assertEquals calls
This isn't currently used, so let's get rid of it.
mozilla#1885) Also implements exposing the discriminator for Python.
The struct name changed in fbc6631, let's make the field name match it.
This makes it so the scaffolding templates use `export_for_udl` rather than generating their own code.
The main change is that we will now use the `cargo release --no-publish` flag to avoid publishing to `crates.io` until the release PR is approved. Added the `--execute` flag by default. I don't think we need to do dry runs since we're now only creating a commit and waiting for PR approval. Updated `release-process.md` to reflect the new process. I left the current wording about separating `uniffi` releases from the rest of the crates, although I noticed that in practice we haven't been doing that. All of our major changes in the last year bumped `UNIFFI_CONTRACT_VERSION`, so we never had a chance to, for example, bump the `unffi-bindgen` version without also bumping the `uniffi` version. Maybe we should revisit this decision, but I didn't want to do that in this change. A consequence of the last note is that we still need to make the 2 `Chore: Release` commits.
PollResult is an `i8` in Rust, but was incorrectly specified as a `Short` in Kotlin. Things seem to be working accidentally, but this should be fixed.
This is needed to allow these to work with proc-macros. This is not needed for UDL, because there we generate a function than inputs `&String`, then pass that value to the Rust function than inputs `&str`. Rust can handle that conversion automatically. However, with proc-macros the scaffolding function types are always exactly the same as the source function types.
Be more consistent with Python variable prefixes
The generation of these docs generates a lot of churn in the gh-pages branch - even when nothing has changed - so instead we skip building and publishing them and link to the generated pages on docs.rs.
This causes the version selector to be rendered into the pages, however they will not be shown until we actually deploy version information. Includes a script to help generate redirects for all our "old" pages.
docs(kotlin): mention `AttachCurrentThread`
Docstrings rarely have unicode characters so these are not adding much value. They present an issue for the downstream moz-central crate (https://bugzilla.mozilla.org/show_bug.cgi?id=1894888), so let's remove them.
…encies Remove the unicode-linebreak / unicode-width dependencies
Changes for v0.27.3
Merge 0.27.3 to main
Cut v0.28.0
fixtures/regressions/cdylib-crate-type-dependency/ffi-crate/Cargo.toml fixtures/regressions/kotlin-experimental-unsigned-types/Cargo.toml uniffi_bindgen/src/bindings/kotlin/templates/CallbackInterfaceTemplate.kt uniffi_bindgen/src/bindings/kotlin/templates/TopLevelFunctionTemplate.kt uniffi_bindgen/src/bindings/python/templates/CallbackInterfaceTemplate.py uniffi_bindgen/src/bindings/python/templates/TopLevelFunctionTemplate.py uniffi_bindgen/src/bindings/swift/templates/CallbackInterfaceTemplate.swift uniffi_bindgen/src/bindings/swift/templates/ObjectTemplate.swift uniffi_bindgen/src/bindings/swift/templates/RecordTemplate.swift uniffi_bindgen/src/bindings/swift/templates/TopLevelFunctionTemplate.swift
Merge/v0.28.0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.