-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
only added to python template right now, can test kotlin but not easily ruby/swift
Python is consuming them, nothing else is yet.
Tested in Kotlin and Python. Ruby already had doc behaviour that makes this work as is once the doc definitions showed up in the tree. Swift is untested.
Hi, could you solve the conflicts? I'm sorry if I messed up with them myself. Let me know if I can somehow help. |
72ad9fa
to
a26981f
Compare
I merged main in. It's still working for our project and the tests I can run still pass. |
uniffi_bindgen/src/library_mode.rs
Outdated
@@ -100,7 +100,12 @@ pub fn generate_external_bindings<T: BindingGenerator>( | |||
} | |||
} | |||
|
|||
for source in sources.iter() { | |||
for source in sources.iter_mut() { |
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.
from what I understood, they (mozilla) would prefer &mut sources
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.
Also, in the last version of the code, this part was extracted
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.
I mean - is it possible to reuse the code here?
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.
Very possible, I've just been blazing forward with using this, trying to release and document the product we're building with it. I have another hackday in two weeks, but I can try to come back and take a look at consolidating in between tickets before then.
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.
I think I've done this, and removed the methods I had added to do it. If you were thinking of a different reusable part let me know.
// Simple error enums only carry a message | ||
case {{ variant.name()|class_name }}(message: String) | ||
{% endfor %} | ||
|
||
{%- else %} | ||
{% for variant in e.variants() %} | ||
{% include "EnumVariantDocsTemplate.swift" %} |
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.
thank you!
Adds a call to generate docs when using library mode (as recommended by the docs for proc macros). This worked in our medium sized project that uses only proc-macros+library mode.