[Bug 2028895] Review Request: rust-tree-sitter - Rust bindings to the Tree-sitter parsing library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=2028895



--- Comment #3 from Aleksei Bavshin <alebastr89@xxxxxxxxx> ---
(In reply to Fabio Valentini from comment #1)
> This crate seems to contain a bundled copy of tree-sitter C library? You
> will need to declare that in the .spec file somehow (and make sure the
> license is also acceptable).

The license is not an issue, everything is coming from the same repository
under a common MIT license.
Unbundling the library doesn't seem to be possible, as one of the provided
features depends on compiling the library with a different set of macros.  I'll
add `bundled(libtree-sitter) = %{version}`.
Btw, do you know if rust-cc is applying our recommended CFLAGS? Do I need to
add anything extra for that?

> 
> Additionally, the Rust bindings are generated sources (with bindgen), which
> is not permissible in Fedora.
> 
> Generated sources must be regenerated at build time, but there is neither a
> build.rs script that supports doing that, nor can we be sure that the
> generated sources haven't been "tampered" with post-generation.
> 
> At any rate, using pre-generated sources from bindgen is a bad idea in
> general, because they encode architecture-specific details from the machine
> that bindgen was run on (i.e. running bindgen on x86_64 machine often
> produces bindings that are wrong or broken on 32-bit architectures, like
> i686 or arm).
> 
> You'll need to ask upstream for a way to regenerate those sources at build
> time (probably a `build.rs` script with Cargo feature flags to turn
> regenerating bindings on or off, or `/usr/bin/bindgen` invocation). You can
> look at other -sys crates how they handle this case (to make sure bindgen is
> run not only during the create build itself, but also when building the
> crate in dependent packages, regardless of chosen feature set).

Uh... no, those were pre-generated 3 years ago. I'm not sure we can still call
it pre-generated after 3 years of manual edits :(
Which also means there's no way to add bindgen to the upstream build process.


-- 
You are receiving this mail because:
You are always notified about changes to this product and component
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2028895
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux