-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
rust: let doctests pick objects from dependencies #14973
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
Conversation
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Signed-off-by: Paolo Bonzini <[email protected]> Message-Id: <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Signed-off-by: Paolo Bonzini <[email protected]> Message-Id: <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Message-Id: <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Message-Id: <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Message-Id: <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Message-Id: <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Message-Id: <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Message-Id: <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Message-Id: <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Message-Id: <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Message-Id: <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Message-Id: <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Message-Id: <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Message-Id: <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Message-Id: <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Message-Id: <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Message-Id: <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Message-Id: <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Message-Id: <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Message-Id: <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Message-Id: <[email protected]>
206cac8
to
9e06656
Compare
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Reviewed-by: Zhao Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Bonzini <[email protected]> Message-Id: <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Reviewed-by: Zhao Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Bonzini <[email protected]> Message-Id: <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Reviewed-by: Zhao Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Bonzini <[email protected]> Message-Id: <[email protected]>
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.
This looks correct to me, just one small nit.
@eli-schwartz asked whether this was a bug fix or a feature new... it's a good question. I think this works correctly for rust targets that are not doctests? If that's the case then I'd consider this a bug fix, if this doesn't work at all it's probably a new feature.
9e06656
to
e82f314
Compare
|
backends.py has an interesting idiom for keeping the unique elements of a list. This is much faster than OrderedSet: * dict.fromkeys() vs. OrderedSet.__init__(): 35% faster on Python 3.13, 50-60% faster on Python 3.10 * list(d) (d is a dict) vs. list(os) (os is an OrderedSet): up to 25% faster on Python 3.13, up to 15% faster on Python 3.10 though it tapers out after a few hundred elements. Add a function to mesonlib to encapsulate this idiom. Signed-off-by: Paolo Bonzini <[email protected]>
If a depedency includes object files, they have to be added to the doctest. However, NinjaBackend was not running flatten_object_list on the doctest. Signed-off-by: Paolo Bonzini <[email protected]>
e82f314
to
d8633f6
Compare
Then for posterity, I would consider this a bug fix rather than a new feature. |
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Reviewed-by: Zhao Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Bonzini <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Reviewed-by: Zhao Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Bonzini <[email protected]>
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Reviewed-by: Zhao Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Bonzini <[email protected]> xemu: Update minimum Meson requirement to 1.8.4 to facilitate building on macOS with Clang 17. Fixes xemu-project#2442
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Reviewed-by: Zhao Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Bonzini <[email protected]> xemu: Update minimum Meson requirement to 1.8.4 to facilitate building on macOS with Clang 17. Fixes #2442
Meson 1.9.0 provides mixed linking of Rust and C objects. As a side effect, this also allows adding dependencies with "sources: ..." files to Rust crates that use structured_sources(). It can also clean up up the meson.build files for Rust noticeably, but due to an issue with doctests (see mesonbuild/meson#14973) that will have to wait for 1.9.1. Reviewed-by: Zhao Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Bonzini <[email protected]>
If a dependency includes object files, they have to be added to the doctest. However, NinjaBackend was not running flatten_object_list on the doctest.