igumnoff / shiva

Shiva library: Implementation in Rust of a parser and generator for documents of any type
https://docs.rs/shiva
Apache License 2.0
291 stars 16 forks source link

cargo build error with E0424, E0425 #128

Closed parkma99 closed 2 weeks ago

parkma99 commented 2 weeks ago

Hi @evgenyigumnov , I noticed this project in Reddit just few hours ago,and I tried compile in my computer but failed. Below is my os information and error message,Thks

OS information: OS: macOS 13.6.3 22G436 arm64 Host: Mac14,3 Kernel: 22.6.0 CPU: Apple M2 rustc 1.82.0 (f6e511eec 2024-10-15) cargo 1.82.0 (8f40fc59f 2024-08-21)

➜  cli git:(main) cargo build --release
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   /Users/m/rust/shiva/shiva-wasm/Cargo.toml
workspace: /Users/m/rust/shiva/Cargo.toml
   Compiling html5ever v0.27.0
   Compiling icu_provider_blob v1.5.0
   Compiling markup5ever v0.12.1
   Compiling lipsum v0.9.1
   Compiling stacker v0.1.17
   Compiling hayagriva v0.5.3
   Compiling caseless v0.2.1
   Compiling derive_builder_macro v0.20.2
   Compiling selectors v0.25.0
error[E0424]: expected value, found module `self`
   --> /Users/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hayagriva-0.5.3/src/lib.rs:495:30
    |
263 |         #[derive(Debug, Clone, PartialEq, Eq, Serialize, Hash)]
    |                                               --------- this function has a `self` parameter, but a macro invocation can only access identifiers it receives from parameters
...
495 |     #[serde(serialize_with = "serialize_one_or_many_opt")]
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `self` value is a keyword only available in methods with a `self` parameter

error[E0425]: cannot find value `__s` in this scope
   --> /Users/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hayagriva-0.5.3/src/lib.rs:495:30
    |
495 |     #[serde(serialize_with = "serialize_one_or_many_opt")]
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0424]: expected value, found module `self`
   --> /Users/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hayagriva-0.5.3/src/lib.rs:501:30
    |
263 |         #[derive(Debug, Clone, PartialEq, Eq, Serialize, Hash)]
    |                                               --------- this function has a `self` parameter, but a macro invocation can only access identifiers it receives from parameters
...
501 |     #[serde(serialize_with = "serialize_one_or_many_opt")]
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `self` value is a keyword only available in methods with a `self` parameter

error[E0425]: cannot find value `__s` in this scope
   --> /Users/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hayagriva-0.5.3/src/lib.rs:501:30
    |
501 |     #[serde(serialize_with = "serialize_one_or_many_opt")]
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0424]: expected value, found module `self`
   --> /Users/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hayagriva-0.5.3/src/lib.rs:505:30
    |
263 |         #[derive(Debug, Clone, PartialEq, Eq, Serialize, Hash)]
    |                                               --------- this function has a `self` parameter, but a macro invocation can only access identifiers it receives from parameters
...
505 |     #[serde(serialize_with = "serialize_one_or_many_opt")]
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `self` value is a keyword only available in methods with a `self` parameter

error[E0425]: cannot find value `__s` in this scope
   --> /Users/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hayagriva-0.5.3/src/lib.rs:505:30
    |
505 |     #[serde(serialize_with = "serialize_one_or_many_opt")]
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `__deserializer` in this scope
   --> /Users/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hayagriva-0.5.3/src/lib.rs:496:32
    |
496 |     #[serde(deserialize_with = "deserialize_one_or_many_opt")]
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `__deserializer` in this scope
   --> /Users/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hayagriva-0.5.3/src/lib.rs:502:32
    |
502 |     #[serde(deserialize_with = "deserialize_one_or_many_opt")]
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `__deserializer` in this scope
   --> /Users/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hayagriva-0.5.3/src/lib.rs:506:32
    |
506 |     #[serde(deserialize_with = "deserialize_one_or_many_opt")]
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

   Compiling attribute-derive v0.6.1
   Compiling typst-timing v0.11.1
   Compiling chrono v0.4.38
   Compiling az v1.2.1
   Compiling toml v0.8.19
   Compiling portable-atomic v1.9.0
   Compiling wasm-bindgen-macro-support v0.2.95
Some errors have detailed explanations: E0424, E0425.
For more information about an error, try `rustc --explain E0424`.
error: could not compile `hayagriva` (lib) due to 9 previous errors
warning: build failed, waiting for other jobs to finish...
evgenyigumnov commented 2 weeks ago

Looks strange

igumn@lenovo MINGW64 ~/shiva (main)
$ rustc --version
rustc 1.82.0 (f6e511eec 2024-10-15)

igumn@lenovo MINGW64 ~/shiva (main)
$ cargo --version
cargo 1.82.0 (8f40fc59f 2024-08-21)

igumn@lenovo MINGW64 ~/shiva (main)
$ cargo build --release
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   C:\Users\igumn\shiva\shiva-wasm\Cargo.toml
workspace: C:\Users\igumn\shiva\Cargo.toml
   Compiling proc-macro2 v1.0.85
   Compiling unicode-ident v1.0.12
   Compiling serde v1.0.203
   Compiling cfg-if v1.0.0
   Compiling autocfg v1.3.0
   Compiling version_check v0.9.4
   Compiling once_cell v1.19.0
   Compiling windows_x86_64_msvc v0.52.5
   Compiling itoa v1.0.11
   Compiling jobserver v0.1.31
   Compiling log v0.4.21
   Compiling memchr v2.7.2
   Compiling simd-adler32 v0.3.7
   Compiling smallvec v1.13.2
   Compiling scopeguard v1.2.0
   Compiling adler v1.0.2
   Compiling crc32fast v1.4.2
   Compiling pkg-config v0.3.30
   Compiling cc v1.0.99
   Compiling miniz_oxide v0.7.3
   Compiling stable_deref_trait v1.2.0
   Compiling windows_x86_64_msvc v0.48.5
   Compiling getrandom v0.2.15
   Compiling siphasher v0.3.11
   Compiling ppv-lite86 v0.2.17
   Compiling windows-targets v0.52.5
   Compiling hashbrown v0.14.5
   Compiling equivalent v1.0.1
   Compiling tinyvec_macros v0.1.1
   Compiling libc v0.2.155
   Compiling lock_api v0.4.12
   Compiling windows-sys v0.52.0
   Compiling num-traits v0.2.19
   Compiling rand_core v0.6.4
   Compiling tinyvec v1.6.0
   Compiling typenum v1.17.0
   Compiling fnv v1.0.7
   Compiling flate2 v1.0.30
   Compiling rand_chacha v0.3.1
   Compiling windows-targets v0.48.5
   Compiling windows-sys v0.48.0
   Compiling generic-array v0.14.7
   Compiling quote v1.0.36
   Compiling encoding_rs v0.8.34
   Compiling syn v2.0.66
   Compiling rand v0.8.5
   Compiling ryu v1.0.18
   Compiling crossbeam-utils v0.8.20
   Compiling spin v0.9.8
   Compiling powerfmt v0.2.0
   Compiling num-conv v0.1.0
   Compiling bytemuck v1.16.0
   Compiling syn v1.0.109
   Compiling time-core v0.1.2
   Compiling deranged v0.3.11
   Compiling rustversion v1.0.17
   Compiling time-macros v0.2.18
   Compiling parking_lot_core v0.9.10
   Compiling bitflags v1.3.2
   Compiling subtle v2.5.0
   Compiling rayon-core v1.12.1
   Compiling arrayvec v0.7.4
   Compiling crossbeam-epoch v0.9.18
   Compiling thiserror v1.0.61
   Compiling unicode-bidi v0.3.15
   Compiling pin-project-lite v0.2.14
   Compiling unicode-normalization v0.1.23
   Compiling crossbeam-deque v0.8.5
   Compiling crypto-common v0.1.6
   Compiling phf_shared v0.10.0
   Compiling aho-corasick v1.1.3
   Compiling float-cmp v0.9.0
   Compiling byteorder v1.5.0
   Compiling regex-syntax v0.8.4
   Compiling strict-num v0.1.1
   Compiling phf_generator v0.10.0
   Compiling parking_lot v0.12.3
   Compiling slab v0.4.9
   Compiling either v1.12.0
   Compiling weezl v0.1.8
   Compiling arrayref v0.3.7
   Compiling percent-encoding v2.3.1
   Compiling futures-core v0.3.30
   Compiling writeable v0.5.5
   Compiling serde_json v1.0.117
   Compiling form_urlencoded v1.2.1
   Compiling rayon v1.10.0
   Compiling tiny-skia-path v0.11.4
   Compiling zstd-sys v2.0.10+zstd.1.5.6
   Compiling time v0.3.36
   Compiling block-buffer v0.10.4
   Compiling kurbo v0.9.5
   Compiling unicase v2.7.0
   Compiling slotmap v1.0.7
   Compiling half v2.4.1
   Compiling base64 v0.21.7
   Compiling heck v0.5.0
   Compiling wasm-bindgen-shared v0.2.92
   Compiling unicode-script v0.5.6
   Compiling synstructure v0.13.1
   Compiling regex-automata v0.4.7
   Compiling embedded-io v0.4.0
   Compiling libm v0.2.8
   Compiling cobs v0.2.3
   Compiling svgtypes v0.13.0
   Compiling digest v0.10.7
   Compiling phf_codegen v0.10.0
   Compiling onig_sys v69.8.1
   Compiling phf_shared v0.11.2
   Compiling fdeflate v0.3.4
   Compiling cpufeatures v0.2.12
   Compiling paste v1.0.15
   Compiling new_debug_unreachable v1.0.6
   Compiling color_quant v1.1.0
   Compiling ttf-parser v0.20.0
   Compiling jpeg-decoder v0.3.1
   Compiling png v0.17.13
   Compiling phf_generator v0.11.2
   Compiling usvg-tree v0.38.0
   Compiling regex v1.10.5
   Compiling serde_derive v1.0.203
   Compiling zerofrom-derive v0.1.4
   Compiling yoke-derive v0.7.4
   Compiling displaydoc v0.2.4
   Compiling zerovec-derive v0.10.2
   Compiling thiserror-impl v1.0.61
   Compiling icu_provider_macros v1.5.0
   Compiling zerofrom v0.1.4
   Compiling futures-macro v0.3.30
   Compiling winapi-util v0.1.8
   Compiling idna v0.5.0
   Compiling bzip2-sys v0.1.11+1.0.8
   Compiling ring v0.17.8
   Compiling proc-macro-error-attr v1.0.4
   Compiling bumpalo v3.16.0
   Compiling unicode-properties v0.1.1
   Compiling pin-utils v0.1.0
   Compiling unicode-bidi-mirroring v0.1.0
   Compiling memmap2 v0.9.4
   Compiling futures-task v0.3.30
   Compiling bit-vec v0.6.3
   Compiling unicode-ccc v0.1.2
   Compiling ident_case v1.0.1
   Compiling strsim v0.11.1
   Compiling zstd-safe v5.0.2+zstd.1.5.2
   Compiling rustls-pki-types v1.7.0
   Compiling linked-hash-map v0.5.6
   Compiling darling_core v0.20.10
   Compiling wasm-bindgen-backend v0.2.92
   Compiling bit-set v0.5.3
   Compiling futures-util v0.3.30
   Compiling fontdb v0.16.2
   Compiling same-file v1.0.6
   Compiling phf_macros v0.11.2
   Compiling tokio-macros v2.3.0
   Compiling tracing-attributes v0.1.27
   Compiling derive-where v1.2.7
   Compiling mio v0.8.11
   Compiling socket2 v0.5.7
   Compiling inout v0.1.3
   Compiling flume v0.11.0
   Compiling proc-macro-error v1.0.4
   Compiling tracing-core v0.1.32
   Compiling simplecss v0.2.1
   Compiling zune-inflate v0.2.54
   Compiling unicode-vo v0.1.0
   Compiling bit_field v0.10.2
   Compiling imagesize v0.12.0
   Compiling utf8parse v0.2.2
   Compiling roxmltree v0.19.0
   Compiling num_cpus v1.16.0
   Compiling data-url v0.3.1
   Compiling base64 v0.22.1
   Compiling lebe v0.5.2
   Compiling line-wrap v0.2.0
   Compiling unscanny v0.1.0
   Compiling base64ct v1.6.0
   Compiling precomputed-hash v0.1.1
   Compiling anstyle v1.0.7
   Compiling onig v6.4.0
   Compiling usvg-parser v0.38.0
   Compiling indexmap v2.2.6
   Compiling yoke v0.7.4
   Compiling bytes v1.6.0
   Compiling bitflags v2.5.0
   Compiling litemap v0.7.3
   Compiling zerovec v0.10.2
   Compiling quick-xml v0.31.0
   Compiling postcard v1.0.8
   Compiling http v1.1.0
   Compiling rustybuzz v0.12.1
   Compiling url v2.5.0
   Compiling tokio v1.38.0
   Compiling bincode v1.3.3
   Compiling password-hash v0.4.2
   Compiling anstyle-wincon v3.0.3
   Compiling exr v1.72.0
   Compiling tinystr v0.7.6
   Compiling icu_locid v1.5.0
   Compiling plist v1.6.1
   Compiling quote-use-macros v0.7.2
   Compiling icu_provider v1.5.0
   Compiling usvg-text-layout v0.38.0
   Compiling darling_macro v0.20.10
   Compiling anstyle-parse v0.2.4
   Compiling tracing v0.1.40
   Compiling phf v0.11.2
   Compiling cipher v0.4.4
   Compiling wasm-bindgen-macro-support v0.2.92
   Compiling walkdir v2.5.0
   Compiling fancy-regex v0.11.0
   Compiling yaml-rust v0.4.5
   Compiling strum_macros v0.26.4
   Compiling comemo-macros v0.4.0
   Compiling tiff v0.9.1
   Compiling gif v0.13.1
   Compiling sha2 v0.10.8
   Compiling hmac v0.12.1
   Compiling anstyle-query v1.1.0
   Compiling string_cache_codegen v0.5.2
   Compiling psm v0.1.21
   Compiling qoi v0.4.1
   Compiling ciborium-io v0.2.2
   Compiling siphasher v1.0.1
   Compiling wasm-bindgen v0.2.92
   Compiling colorchoice v1.0.1
   Compiling minimal-lexical v0.2.1
   Compiling winapi v0.3.9
   Compiling icu_locid_transform_data v1.5.0
   Compiling is_terminal_polyfill v1.70.0
   Compiling untrusted v0.9.0
   Compiling unicode-segmentation v1.11.0
   Compiling mac v0.1.1
   Compiling pico-args v0.5.0
   Compiling xmlwriter v0.1.0
   Compiling proc-macro-utils v0.8.0
   Compiling futf v0.1.5
   Compiling usvg v0.38.0
   Compiling strum v0.26.2
   Compiling anstream v0.6.14
   Compiling nom v7.1.3
   Compiling icu_locid_transform v1.5.0
   Compiling comemo v0.4.0
   Compiling ciborium-ll v0.2.2
   Compiling markup5ever v0.11.0
   Compiling image v0.24.9
   Compiling pbkdf2 v0.11.0
   Compiling wasm-bindgen-macro v0.2.92
   Compiling zstd v0.11.2+zstd.1.5.2
   Compiling syntect v5.2.0
   Compiling aes v0.8.4
   Compiling darling v0.20.10
   Compiling quote-use v0.7.2
   Compiling bzip2 v0.4.4
   Compiling unic-langid-impl v0.9.5
   Compiling icu_collections v1.5.0
   Compiling http-body v1.0.0
   Compiling serde_spanned v0.6.6
   Compiling ecow v0.2.2
   Compiling toml_datetime v0.6.6
   Compiling string_cache v0.8.7
   Compiling phf v0.10.1
   Compiling enum-ordinalize-derive v4.3.1
   Compiling sha1 v0.10.6
   Compiling stacker v0.1.15
   Compiling num-integer v0.1.46
   Compiling indexmap-nostd v0.4.0
   Compiling winnow v0.6.13
   Compiling interpolator v0.5.0
   Compiling portable-atomic v1.6.0
   Compiling palette v0.7.6
   Compiling rust_decimal v1.35.0
   Compiling by_address v1.2.1
   Compiling unsafe-libyaml v0.2.11
   Compiling constant_time_eq v0.1.5
   Compiling collection_literals v1.0.1
   Compiling httparse v1.9.3
   Compiling rustls v0.22.4
   Compiling utf-8 v0.7.6
   Compiling numerals v0.1.4
   Compiling downcast-rs v1.2.1
   Compiling dtoa v1.0.9
   Compiling unicode-math-class v0.1.0
   Compiling az v1.2.1
   Compiling dtoa-short v0.3.5
   Compiling wasmi_core v0.13.0
   Compiling typst-syntax v0.11.1
   Compiling tendril v0.4.3
   Compiling biblatex v0.9.3
   Compiling attribute-derive-macro v0.6.1
   Compiling serde_yaml v0.9.34+deprecated
   Compiling zip v0.6.6
   Compiling palette_derive v0.7.6
   Compiling enum-ordinalize v4.3.0
   Compiling num-bigint v0.4.5
   Compiling wasmparser-nostd v0.100.2
   Compiling toml_edit v0.22.14
   Compiling caseless v0.2.1
   Compiling unic-langid v0.9.5
   Compiling derive_builder_core v0.20.1
   Compiling rustls-webpki v0.102.4
   Compiling ciborium v0.2.2
   Compiling zerotrie v0.1.3
   Compiling citationberg v0.3.1
   Compiling html5ever v0.26.0
   Compiling core_maths v0.1.0
   Compiling cssparser-macros v0.6.1
   Compiling tiny-skia v0.11.4
   Compiling gif v0.12.0
   Compiling selectors v0.25.0
   Compiling terminal_size v0.3.0
   Compiling approx v0.5.1
   Compiling rgb v0.8.37
   Compiling csv-core v0.1.11
   Compiling ahash v0.8.11
   Compiling zeroize v1.8.1
   Compiling clap_lex v0.7.1
   Compiling bytecount v0.6.8
   Compiling unicode-width v0.1.13
   Compiling lockfree-object-pool v0.1.6
   Compiling heck v0.4.1
   Compiling wasmi_arena v0.4.1
   Compiling futures-sink v0.3.30
   Compiling zip v2.1.3
   Compiling utf8_iter v1.0.4
   Compiling tower-layer v0.3.2
   Compiling icu_properties_data v1.5.0
   Compiling typed-arena v2.0.2
   Compiling fast-srgb8 v1.0.0
   Compiling chinese-variant v1.1.3
   Compiling mutate_once v0.1.1
   Compiling tower-service v0.3.2
   Compiling icu_segmenter_data v1.5.0
   Compiling kamadak-exif v0.5.5
   Compiling chinese-number v0.7.7
   Compiling icu_segmenter v1.5.0
   Compiling hayagriva v0.5.3
   Compiling zopfli v0.8.1
   Compiling icu_properties v1.5.0
   Compiling clap_builder v4.5.6
   Compiling typst-macros v0.11.1
   Compiling wasmi v0.31.2
   Compiling tokio-util v0.7.11
   Compiling getopts v0.2.21
   Compiling nom_locate v4.2.0
   Compiling csv v1.3.0
   Compiling lipsum v0.9.1
   Compiling resvg v0.38.0
   Compiling cssparser v0.31.2
   Compiling icu_provider_blob v1.5.0
   Compiling toml v0.8.14
   Compiling derive_builder_macro v0.20.1
   Compiling attribute-derive v0.6.1
   Compiling typst-timing v0.11.1
   Compiling two-face v0.3.0
   Compiling icu_provider_adapters v1.5.0
   Compiling angle v0.5.0
   Compiling webpki-roots v0.26.2
   Compiling derive_more v0.99.17
   Compiling clap_derive v4.5.5
   Compiling pin-project-internal v1.1.5
   Compiling fxhash v0.2.1
   Compiling pdf-writer v0.9.3
   Compiling chrono v0.4.38
   Compiling servo_arc v0.3.0
   Compiling qcms v0.3.0
   Compiling anyhow v1.0.86
   Compiling try-lock v0.2.5
   Compiling pulldown-cmark v0.11.0
   Compiling hypher v0.1.5
   Compiling half v1.8.3
   Compiling lazy_static v1.4.0
   Compiling xml-rs v0.8.20
   Compiling if_chain v1.0.2
   Compiling litrs v0.4.1
   Compiling atomic-waker v1.1.2
   Compiling typst-assets v0.11.1
   Compiling deunicode v1.6.0
   Compiling zerocopy v0.7.34
   Compiling document-features v0.2.8
   Compiling slug v0.1.6
   Compiling typst v0.11.1
   Compiling h2 v0.4.5
   Compiling shiva-color-rs v0.0.1
   Compiling clap v4.5.6
   Compiling want v0.3.1
   Compiling pin-project v1.1.5
   Compiling svg2pdf v0.10.0
   Compiling ureq v2.9.7
   Compiling get-size-derive v0.1.3
   Compiling derive_builder v0.20.1
   Compiling kparse v3.0.5
   Compiling rust_decimal_macros v1.34.2
   Compiling http-body-util v0.1.2
   Compiling derivative v2.2.0
   Compiling futures-channel v0.3.30
   Compiling codepage v0.1.1
   Compiling entities v1.0.1
   Compiling pulldown-cmark-escape v0.11.0
   Compiling mime v0.3.17
   Compiling subsetter v0.1.1
   Compiling base64 v0.13.1
   Compiling ego-tree v0.6.2
   Compiling unicode_categories v0.1.1
   Compiling native-tls v0.2.12
   Compiling shell-words v1.1.0
   Compiling httpdate v1.0.3
   Compiling md5 v0.7.0
   Compiling get-size v0.1.4
   Compiling xmp-writer v0.2.0
   Compiling shiva-spreadsheet-ods v0.0.2
   Compiling lopdf v0.32.0
   Compiling rtf-parser v0.3.0
   Compiling hyper v1.3.1
   Compiling comrak v0.28.0
   Compiling scraper v0.19.0
   Compiling docx-rs v0.4.17
   Compiling calamine v0.24.0
   Compiling ehttp v0.5.0
   Compiling tower v0.4.13
   Compiling serde-xml-rs v0.6.0
   Compiling rust_xlsxwriter v0.64.2
   Compiling schannel v0.1.23
   Compiling hyper-util v0.1.5
   Compiling mime_guess v2.0.4
   Compiling axum-core v0.4.3
   Compiling multer v3.1.0
   Compiling sync_wrapper v0.1.2
   Compiling tokio-native-tls v0.3.1
   Compiling serde_urlencoded v0.7.1
   Compiling async-trait v0.1.80
   Compiling axum v0.7.5
   Compiling hyper-tls v0.6.0
   Compiling js-sys v0.3.69
   Compiling serde_path_to_error v0.1.16
   Compiling rustls-pemfile v2.1.2
   Compiling env_filter v0.1.0
   Compiling winreg v0.52.0
   Compiling humantime v2.1.0
   Compiling ipnet v2.9.0
   Compiling sync_wrapper v1.0.1
   Compiling matchit v0.7.3
   Compiling reqwest v0.12.4
   Compiling env_logger v0.11.3
   Compiling tower-http v0.5.2
   Compiling web-sys v0.3.69
   Compiling console_error_panic_hook v0.1.7
   Compiling typst-pdf v0.11.1
   Compiling shiva v1.4.6 (C:\Users\igumn\shiva\lib)
warning: use of deprecated function `base64::encode`: Use Engine::encode
   --> lib\src\json.rs:162:47
    |
162 |                         Value::String(base64::encode(&image_data.bytes())),
    |                                               ^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default

warning: use of deprecated function `base64::decode`: Use Engine::decode
   --> lib\src\json.rs:398:45
    |
398 |             let bytes = Bytes::from(base64::decode(bytes_str)?);
    |                                             ^^^^^^

warning: unreachable pattern
   --> lib\src\markdown.rs:669:9
    |
669 |         _ => {
    |         ^ no value can reach this
    |
note: multiple earlier patterns match some of the same values
   --> lib\src\markdown.rs:669:9
    |
495 |         Element::Text { text, .. } => {
    |         -------------------------- matches some of the same values
...
504 |         Element::Header { level, text } => {
    |         ------------------------------- matches some of the same values
...
520 |         Element::Paragraph { elements } => {
    |         ------------------------------- matches some of the same values
...
533 |         Element::List { elements, numbered } => {
    |         ------------------------------------ matches some of the same values
...
669 |         _ => {
    |         ^ ...and 3 other patterns collectively make this unreachable
    = note: `#[warn(unreachable_patterns)]` on by default

warning: unused variable: `align`
   --> lib\src\json.rs:419:17
    |
419 |             let align = ImageAlignment::from_str(align_str)
    |                 ^^^^^ help: if this is intentional, prefix it with an underscore: `_align`
    |
    = note: `#[warn(unused_variables)]` on by default

warning: unreachable pattern
   --> lib\src\rtf.rs:331:17
    |
331 |                 _other_element => {
    |                 ^^^^^^^^^^^^^^ no value can reach this
    |
note: multiple earlier patterns match some of the same values
   --> lib\src\rtf.rs:331:17
    |
214 |                 Element::Header { level, text } => {
    |                 ------------------------------- matches some of the same values
...
222 |                 Element::Text { text, size } => {
    |                 ---------------------------- matches some of the same values
...
226 |                 Element::Paragraph { elements } => {
    |                 ------------------------------- matches some of the same values
...
235 |                 Element::List { elements, numbered } => {
    |                 ------------------------------------ matches some of the same values
...
331 |                 _other_element => {
    |                 ^^^^^^^^^^^^^^ ...and 3 other patterns collectively make this unreachable

warning: for loop over a `&Result`. This is more readably written as an `if let` statement
   --> lib\src\xml.rs:104:21
    |
104 |         for node in &tree {
    |                     ^^^^^
    |
    = note: `#[warn(for_loops_over_fallibles)]` on by default
help: to check pattern in a loop use `while let`
    |
104 |         while let Ok(node) = &tree {
    |         ~~~~~~~~~~~~~    ~~~
help: consider unwrapping the `Result` with `?` to iterate over its contents
    |
104 |         for node in &tree? {
    |                          +
help: consider using `if let` to clear intent
    |
104 |         if let Ok(node) = &tree {
    |         ~~~~~~~~~~    ~~~

warning: `shiva` (lib) generated 6 warnings
   Compiling server v1.0.0 (C:\Users\igumn\shiva\server)
   Compiling cli v1.0.0 (C:\Users\igumn\shiva\cli)
   Compiling shiva-wasm v0.1.0 (C:\Users\igumn\shiva\shiva-wasm)
   Compiling test v0.1.0 (C:\Users\igumn\shiva\test)
    Finished `release` profile [optimized] target(s) in 2m 58s

On my windows and linux OS it is fine

parkma99 commented 2 weeks ago

little confusing,I will try to fix it sometime。

parkma99 commented 2 weeks ago

just delete Cargo.lock and recompiler ,it worked.