Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/support/nimbus-fml/uniffi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# cdylib_name = "cirrus"

[bindings.python.custom_types.JsonObject]
imports = ["json"]
imports = ["json", "typing"]
into_custom = "json.loads({})"
from_custom = "json.dumps({})"
type_name = "dict"
type_name = "typing.Dict[str, typing.Any]"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to add typing to the imports list. I think this currently works because UniFFI imports typing for its own purposes, but that feels a bit fragile. Double-check me though, I could definitely be wrong about the exact config needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it causes typing to be imported twice, but it works, and I like not depending on uniffi to implicitly import typing given that it has real potential to not be imported in the future if uniffi doesn't need it