Граф коммитов

1578 Коммитов

Автор SHA1 Сообщение Дата
Jan-Erik Rediger 61811c77e0 Regression test for doc annotations parsing failure 2024-06-17 12:27:43 +02:00
bendk cd38ccea82
Merge pull request #2148 from bendk/cut-v0.28.0
Cut v0.28.0
2024-06-11 14:38:55 -04:00
Ben Dean-Kawamura 5903ce59b3 chore: Release 2024-06-11 14:17:56 -04:00
Ben Dean-Kawamura f486682ffe chore: Release 2024-06-11 14:17:30 -04:00
bendk ce178e9fef
Merge pull request #2143 from bendk/merge-0.27.3-to-main
Merge 0.27.3 to main
2024-06-03 13:29:41 -04:00
Ben Dean-Kawamura fb752f8936 Merging the release-v0.27.x back into main 2024-06-03 12:13:49 -04:00
bendk 760660b3f1
Merge pull request #2142 from bendk/release-v0.27.x
Changes for v0.27.3
2024-06-03 11:39:46 -04:00
Ben Dean-Kawamura 8cd1ba2c93 Adding changelog entry for 0.27.3 2024-06-03 10:58:13 -04:00
Ben Dean-Kawamura 99d851ee16 chore: Release 2024-06-03 10:51:18 -04:00
Ben Dean-Kawamura 051f1291c2 chore: Release 2024-06-03 10:50:43 -04:00
bendk e26e7defdb
Merge pull request #2141 from bendk/0.27-remove-unicode-dependencies
Remove the unicode-linebreak / unicode-width dependencies
2024-06-03 10:39:55 -04:00
Ben Dean-Kawamura df87af5fcd Remove the unicode-linebreak / unicode-width dependencies
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.
2024-06-03 10:24:49 -04:00
Mark Hammond aa5dec9547
Fix broken overview link in docs (#2140) 2024-06-01 09:13:38 -04:00
Mark Hammond 0096ee1d07
Deploy the docs site using mike (#2139) 2024-05-31 10:06:49 -04:00
Mark Hammond b83b3845b8
Fix typo in tools/requirements_docs.txt (#2138) 2024-05-30 11:31:57 -04:00
bendk 76ef912c42
Merge pull request #2133 from flisky/main
docs(kotlin): mention `AttachCurrentThread`
2024-05-30 09:58:32 -04:00
Yin Jifeng 957e0db240 build runtime 2024-05-30 21:55:37 +08:00
Yin Jifeng 87bcec4202 rewords 2024-05-30 21:52:50 +08:00
Mark Hammond 690fd55964
Introduce `mike` to the doc generation process. (#2132)
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.
2024-05-30 09:25:22 -04:00
Mark Hammond 8541a0f52c
Stop building and publishing Rust API docs. (#2131)
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.
2024-05-30 09:24:36 -04:00
Yin Jifeng e05594d3fb rewords 2024-05-30 00:15:40 +08:00
Yin Jifeng cb7a5cb41a remove unnecessary link 2024-05-29 23:40:21 +08:00
Yin Jifeng 15150f3bd8 code review round 1 2024-05-29 23:35:58 +08:00
bendk 396e451dbc
Merge pull request #1908 from bendk/python-variable-prefixes
Be more consistent with Python variable prefixes
2024-05-29 09:30:47 -04:00
Yin Jifeng 766b9e1af4 docs(kotlin): mention `AttachCurrentThread` 2024-05-29 13:34:23 +08:00
bendk e83fc4eae2
Merge pull request #2113 from saks/possible_fix_for_2000
Add support for cfg_attr-like attributes
2024-05-28 10:42:36 -04:00
Samarth Verma c3e57f7429
Fix small typo in docs (#2129) 2024-05-25 18:52:19 +02:00
Aliaksandr Rahalevich abe062d106 typo fix 2024-05-24 18:14:35 -07:00
Aliaksandr Rahalevich c5f994898c update docs 2024-05-24 18:11:04 -07:00
Aliaksandr Rahalevich f341d488c3 update changelog 2024-05-24 17:51:57 -07:00
Aliaksandr Rahalevich a5e536fa6a limit support to "cfg_attr" only 2024-05-24 10:22:44 -07:00
Mark Hammond 028f34b633
Fix proc_macro defined errors when they aren't used as errors. (#2119)
When a `#[derive(uniffi::Error)]` didn't appear in any function signatures,
the FfiConverter for the item was written to assume an error, but the
bindings FfiConverter treated the item as a plain-old Enum. This caused
runtime errors when trying to unpack the rustbuffers due to the
disagreement about the buffer format.

As part of fixing this, the `Option<bool>` to try and represent the
flatness of Enums/Errors was replaced with an `EnumShape` enum to
make these states clearer and so the ComponentInterface can better
understand the layout.

Fixes #2108
2024-05-24 13:06:45 -04:00
Ben Dean-Kawamura 59c17bef86 Be more consistent with Python variable prefixes
Always use `_uniffi`, `_Uniffi`, or `_UNIFFI` for module-level names.
The leading underscore is to indicate private variables and makes it so
the names don't appear in autocomplete. I think this is the most
Pythonic naming style.

Use `_uniffi` rather than simply `_` to avoid name collisions. I think
the general contract with our users should be that we own the `uniffi`
prefix.  If they want to name something `UniffiFoo`, then they take the
risk of a name collision.
2024-05-24 12:08:20 -04:00
Hamza Jadid a45d889a30
Remove redundant semicolons from Kotlin bindings (#2125) 2024-05-24 09:53:40 -04:00
Mark Hammond f15901cf54 Remove unused and incorrect defaults in Kotlin and Swift.
Both bindings supply a default for package_name/cdylib which is
different to the default actually and unconditionally applied.
2024-05-23 22:24:18 -04:00
Johannes Marbach 15438ec611
Fix typo in comment (#2123) 2024-05-23 14:18:40 -04:00
Mark Hammond 962de986f0
Allow errors to be tuple enums. (#2118)
Follows on from #2004 which allowed tuple enums in plain enums,
it's now possible to use tuple enums for errors.
2024-05-20 12:54:37 -04:00
Mark Hammond aa338ccb43
Add localizedDescription support to swift errors. (#2116)
Also some extra error string semantics tests for kotlin.

Fixes #2110
2024-05-18 16:22:25 -04:00
Mark Hammond 874e656c94
Remove unused `cdylib_name` from the Swift templates (#2114) 2024-05-17 14:26:26 -04:00
Mark Hammond f14a453779
Update the BindingGenerator trait and remove BindingsConfig. (#2094)
This is a breaking change for BindingGenerators, and follows up on
other breaking changes made for this release (#2078). Between them,
it is intended to offer a better framework for binding generators
for future versions and break unintentional coupling between
uniffi_bindgen and the builtin bindings.

This patch updates the `BindingGenerator` trait to give binding generators
more control over the binding generation process and to simplify the
interactions between the generator and `uniffi_bindgen`.

The trait `BindingsConfig` has been removed and replaced with a new
method on `BindingGenerator` which passes the generator the entire
list of all `ComponentInterface` and `Config` objects to be used in the
generation, which the generator can modify as necessary. The binding
generator is also passed the entire list of items to generate rather
than called once per item - this gives the generator more flexibility
in how the items are generated.

A new `Component` struct has been introduced which holds all necessary
information for a single crate/namespace, including the `ComponentInterface`
and `Config`. These structs are passed to the `BindingGenerator`

A new `GenerationSettings` struct is defined to pass options to the generators.
2024-05-16 20:43:29 -04:00
Aliaksandr Rahalevich 83ff3c6555 add support for cfg_attr-like attributes 2024-05-15 20:11:46 -07:00
bendk 992844631c
Merge pull request #2112 from bendk/release-0.27.x
Changes for the 0.27.2 release
2024-05-15 16:18:44 -04:00
Ben Dean-Kawamura 142858003e chore: Release 2024-05-15 15:38:15 -04:00
Ben Dean-Kawamura 5ef30af9fe chore: Release 2024-05-15 15:38:15 -04:00
bendk e226ec6491
Merge pull request #2100 from Vinnstah/kotlin-assoc-value-bug
Bugfix: Enum with associated value generates non compiling Kotlin code
2024-05-15 14:53:18 -04:00
kirahsapong 4fa670f35a
Fix typos in user guide tutorial udl_file (#2111) 2024-05-15 13:17:00 -04:00
heinrich5991 11c9a0a769
Prefix newly added globals in Python with underscores (#2109)
* Prefix newly added globals in Python with underscores

* Python: Don't glob-import `uniffi_set_event_loop`

This name is internal to uniffi, it should be explicitly named using
`library.uniffi_set_event_loop`. Note this in the docs.

Followup of #1599.
2024-05-15 09:53:31 -04:00
Viktor Jansson 5e47e24929
Simplify destroy_fields macro 2024-05-14 23:14:32 +02:00
bendk fe45feac1f
Merge pull request #2102 from bendk/release-0.27.x
Changes for the `0.27.2`
2024-05-14 10:49:29 -04:00
Jan-Erik Rediger 0acff050bd mkdocs: Use pymdown-extensions to get syntax highlighting in the docs
Fixes #2106
2024-05-13 17:05:13 +02:00