Coder Social home page Coder Social logo

[Bug] test failure on debian about uom HOT 5 CLOSED

werdahias avatar werdahias commented on July 17, 2024
[Bug] test failure on debian

from uom.

Comments (5)

iliekturtles avatar iliekturtles commented on July 17, 2024

error: A least one underlying storage type must be enabled. See the features section of uom documentation for available underlying storage type options.

I believe all the warnings are a result of this error. At least one underlying storage type feature must be enabled. The default includes both f32 and f64 for convenience. I'm not familiar with how crate features interact with Debian packaging, however I recommend using at least f32.

uom/Cargo.toml

Line 50 in 7c4b27b

default = ["autoconvert", "f32", "f64", "si", "std"]

uom/src/lib.rs

Lines 58 to 108 in 7c4b27b

//! ## Features
//! `uom` has multiple `Cargo` features for controlling available underlying storage types, the
//! inclusion of the pre-built [International System of Units][si] (SI), support for
//! [Serde][serde], and `no_std` functionality. The features are described below. `f32`, `f64`,
//! `std`, and `si` are enabled by default. Features can be cherry-picked by using the
//! `--no-default-features` and `--features "..."` flags when compiling `uom` or specifying
//! features in Cargo.toml:
//!
//! ```toml
//! [dependencies]
//! uom = {
//! version = "0.33.0",
//! default-features = false,
//! features = [
//! "autoconvert", # automatic base unit conversion.
//! "usize", "u8", "u16", "u32", "u64", "u128", # Unsigned integer storage types.
//! "isize", "i8", "i16", "i32", "i64", "i128", # Signed integer storage types.
//! "bigint", "biguint", # Arbitrary width integer storage types.
//! "rational", "rational32", "rational64", "bigrational", # Integer ratio storage types.
//! "complex32", "complex64", # Complex floating point storage types.
//! "f32", "f64", # Floating point storage types.
//! "si", "std", # Built-in SI system and std library support.
//! "use_serde", # Serde support.
//! ]
//! }
//! ```
//!
//! * `autoconvert` -- Feature to enable automatic conversion between base units in binary
//! operators. Disabling the feature only allows for quantities with the same base units to
//! directly interact. The feature exists to account for compiler limitations where zero-cost
//! code is not generated for non-floating point underlying storage types.
//! * `usize`, `u8`, `u16`, `u32`, `u64`, `u128`, `isize`, `i8`, `i16`, `i32`, `i64`, `i128`,
//! `bigint`, `biguint`, `rational`, `rational32`, `rational64`, `bigrational`, `complex32`,
//! `complex64`, `f32`, `f64` -- Features to enable underlying storage types. At least one of
//! these features must be enabled. `f32` and `f64` are enabled by default. See the
//! [Design](#design) section for implications of choosing different underlying storage types.
//! * `si` -- Feature to include the pre-built [International System of Units][si] (SI). Enabled by
//! default.
//! * `std` -- Feature to compile with standard library support. Disabling this feature compiles
//! `uom` with `no_std`. Enabled by default.
//! * `use_serde` -- Feature to enable support for serialization and deserialization of quantities
//! with the [Serde][serde] crate. Disabled by default.
//!
//! [Serde][serde] support for the `big*` and `rational*` underlying storage types requires
//! manually enabling the `serde` feature for the `num-rational` and `num-bigint` crates. To do
//! so, you can add one or both of the following lines to your `Cargo.toml`:
//!
//! ```toml
//! num-rational = { version = "*", features = ["serde"] }
//! num-bigint = { version = "*", features = ["serde"] }
//! ```

from uom.

werdahias avatar werdahias commented on July 17, 2024

Huh, according to the Cargo.toml in debian this is already enabled.

from uom.

iliekturtles avatar iliekturtles commented on July 17, 2024

Odd. The command line you posted above only shows 'serde'/'use_serde' enabled: --cfg 'feature="serde"' --cfg 'feature="use_serde"'. Any ideas how that command is getting generated with just the serde features and nothing else?

from uom.

werdahias avatar werdahias commented on July 17, 2024

so it seems that the autopkgtest (the command running) tests with some/all features en/disabled. This is was causes this.

from uom.

iliekturtles avatar iliekturtles commented on July 17, 2024

Glad you found the root cause! Marking this issue as closed.

from uom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.