getzola / zola

A fast static site generator in a single binary with everything built-in. https://www.getzola.org
https://www.getzola.org
MIT License
13.76k stars 956 forks source link

Cannot build zola 0.16.0 from the source code with the `indexing-ja` feature #1930

Closed toku-sa-n closed 2 years ago

toku-sa-n commented 2 years ago

Bug Report

Environment

Zola version: 0.16.0 rustc version: 1.58.0 Cargo version: 1.58.0

Expected Behavior

Zola 0.16.0 compiles with the indexing-ja feature

Current Behavior

Compile error happens.

``` %cargo build --features indexing-ja Compiling libc v0.2.126 Compiling cfg-if v1.0.0 Compiling autocfg v1.1.0 Compiling version_check v0.9.4 Compiling proc-macro2 v1.0.40 Compiling unicode-ident v1.0.2 Compiling quote v1.0.20 Compiling syn v1.0.98 Compiling memchr v2.5.0 Compiling once_cell v1.13.0 Compiling serde_derive v1.0.139 Compiling serde v1.0.139 Compiling log v0.4.17 Compiling bitflags v1.3.2 Compiling hashbrown v0.12.2 Compiling regex-syntax v0.6.27 Compiling ryu v1.0.10 Compiling byteorder v1.4.3 Compiling ppv-lite86 v0.2.16 Compiling scopeguard v1.1.0 Compiling encoding_index_tests v0.1.4 Compiling itoa v1.0.2 Compiling siphasher v0.3.10 Compiling lazy_static v1.4.0 Compiling anyhow v1.0.58 Compiling crossbeam-utils v0.8.10 Compiling build_const v0.2.2 Compiling heck v0.4.0 Compiling termcolor v1.1.3 Compiling os_str_bytes v6.1.0 Compiling strsim v0.10.0 Compiling futures-core v0.3.21 Compiling crc32fast v1.3.2 Compiling textwrap v0.15.0 Compiling adler v1.0.2 Compiling typenum v1.15.0 Compiling yada v0.5.0 Compiling fnv v1.0.7 Compiling regex-automata v0.1.10 Compiling pin-project-lite v0.2.9 Compiling lexical-core v0.7.6 Compiling humantime v2.1.0 Compiling bytes v1.1.0 Compiling pkg-config v0.3.25 Compiling static_assertions v1.1.0 Compiling futures-sink v0.3.21 Compiling slab v0.4.6 Compiling glob v0.3.0 Compiling smallvec v1.9.0 Compiling arrayvec v0.5.2 Compiling untrusted v0.7.1 Compiling rayon-core v1.9.3 Compiling spin v0.5.2 Compiling matches v0.1.9 Compiling tinyvec_macros v0.1.0 Compiling serde_json v1.0.82 Compiling itoa v0.4.8 Compiling percent-encoding v2.1.0 Compiling parking_lot_core v0.9.3 Compiling futures-task v0.3.21 Compiling new_debug_unreachable v1.0.4 Compiling adler32 v1.2.0 Compiling same-file v1.0.6 Compiling futures-util v0.3.21 Compiling httparse v1.7.1 Compiling radium v0.5.3 Compiling num_threads v0.1.6 Compiling rustls v0.20.6 Compiling either v1.7.0 Compiling ucd-trie v0.1.4 Compiling time-macros v0.2.4 Compiling futures-channel v0.3.21 Compiling unicode-bidi v0.3.8 Compiling maplit v1.0.2 Compiling mac v0.1.1 Compiling pin-utils v0.1.0 Compiling futures-io v0.3.21 Compiling weezl v0.1.7 Compiling tap v1.0.1 Compiling unic-common v0.9.0 Compiling wyz v0.2.0 Compiling utf-8 v0.7.6 Compiling precomputed-hash v0.1.1 Compiling try-lock v0.2.3 Compiling base64 v0.13.0 Compiling funty v1.1.0 Compiling unic-char-range v0.9.0 Compiling convert_case v0.4.0 Compiling bytecount v0.3.2 Compiling lebe v0.5.1 Compiling bytecount v0.6.3 Compiling half v1.8.2 Compiling safemem v0.3.3 Compiling httpdate v1.0.2 Compiling encoding_rs v0.8.31 Compiling linked-hash-map v0.5.6 Compiling tower-service v0.3.2 Compiling color_quant v1.1.0 Compiling arrayvec v0.4.12 Compiling bit_field v0.10.1 Compiling doc-comment v0.3.3 Compiling xmlparser v0.13.3 Compiling nodrop v0.1.14 Compiling scoped_threadpool v0.1.9 Compiling bytemuck v1.10.0 Compiling mime v0.3.16 Compiling deunicode v0.4.3 Compiling tinystr v0.3.4 Compiling xml-rs v0.8.4 Compiling pulldown-cmark v0.9.1 Compiling cpufeatures v0.2.2 Compiling humansize v1.1.1 Compiling quick-error v1.2.3 Compiling ipnet v2.5.0 Compiling any_ascii v0.1.7 Compiling relative-path v1.7.2 Compiling unicode-segmentation v1.9.0 Compiling getrandom v0.1.16 Compiling cfg-if v0.1.10 Compiling byte-tools v0.3.1 Compiling mutate_once v0.1.1 Compiling lazycell v1.3.0 Compiling opaque-debug v0.2.3 Compiling fake-simd v0.1.2 Compiling pathdiff v0.2.1 Compiling tracing-core v0.1.28 Compiling thread_local v1.1.4 Compiling encoding-index-japanese v1.20141219.5 Compiling encoding-index-singlebyte v1.20141219.5 Compiling encoding-index-korean v1.20141219.5 Compiling encoding-index-simpchinese v1.20141219.5 Compiling encoding-index-tradchinese v1.20141219.5 Compiling uncased v0.9.7 Compiling proc-macro-error-attr v1.0.4 Compiling proc-macro-error v1.0.4 Compiling nom v5.1.2 Compiling unicase v2.6.0 Compiling generic-array v0.14.5 Compiling nom v6.1.2 Compiling ahash v0.7.6 Compiling indexmap v1.9.1 Compiling lock_api v0.4.7 Compiling num-traits v0.2.15 Compiling memoffset v0.6.5 Compiling num-integer v0.1.45 Compiling crossbeam-epoch v0.9.9 Compiling tokio v1.20.0 Compiling rayon v1.5.3 Compiling num-iter v0.1.43 Compiling num-rational v0.4.1 Compiling crc v1.8.1 Compiling miniz_oxide v0.5.3 Compiling clap_lex v0.2.4 Compiling tinyvec v1.6.0 Compiling http v0.2.8 Compiling form_urlencoded v1.0.1 Compiling deflate v1.0.0 Compiling inflate v0.4.5 Compiling walkdir v2.3.2 Compiling futf v0.1.5 Compiling pest v2.1.3 Compiling unic-ucd-version v0.9.0 Compiling unic-char-property v0.9.0 Compiling line-wrap v0.1.1 Compiling rustls-pemfile v1.0.0 Compiling gif v0.11.4 Compiling yaml-rust v0.4.5 Compiling unic-langid-impl v0.9.0 Compiling slug v0.1.4 Compiling roxmltree v0.13.1 Compiling lexical-sort v0.3.1 Compiling block-padding v0.1.5 Compiling kamadak-exif v0.5.4 Compiling open v3.0.1 Compiling encoding v0.2.33 Compiling tracing v0.1.35 Compiling unic-ucd-segment v0.9.0 Compiling tendril v0.4.3 Compiling unic-langid v0.9.0 Compiling want v0.3.0 Compiling http-body v0.4.5 Compiling unicode-normalization v0.1.21 Compiling aho-corasick v0.7.18 Compiling csv-core v0.1.10 Compiling quick-xml v0.17.2 Compiling pest_meta v2.1.3 Compiling flate2 v1.0.24 Compiling png v0.17.5 Compiling crossbeam-channel v0.5.5 Compiling errors v0.1.0 (/tmp/tmp.85eEyYkfsO/zola-0.16.0/components/errors) Compiling bitvec v0.19.6 Compiling phf_shared v0.10.0 Compiling unic-segment v0.9.0 Compiling num-format v0.4.0 Compiling spin v0.9.4 Compiling mime_guess v2.0.4 Compiling generic-array v0.12.4 Compiling minidom v0.12.0 Compiling lzma-rs v0.2.0 Compiling idna v0.2.3 Compiling phf v0.10.1 Compiling getrandom v0.2.7 Compiling jobserver v0.1.24 Compiling num_cpus v1.13.1 Compiling atty v0.2.14 Compiling mio v0.8.4 Compiling filetime v0.2.17 Compiling socket2 v0.4.4 Compiling xattr v0.2.3 Compiling time v0.3.11 Compiling iovec v0.1.4 Compiling net2 v0.2.37 Compiling inotify-sys v0.1.5 Compiling nix v0.24.1 Compiling regex v1.6.0 Compiling minify-js v0.1.5 Compiling crossbeam-deque v0.8.1 Compiling digest v0.8.1 Compiling block-buffer v0.7.3 Compiling rand_core v0.6.3 Compiling nanorand v0.7.0 Compiling cc v1.0.73 Compiling block-buffer v0.10.2 Compiling crypto-common v0.1.5 Compiling threadpool v1.8.1 Compiling url v2.2.2 Compiling tar v0.4.38 Compiling parking_lot v0.12.1 Compiling bytes v0.4.12 Compiling sass-sys v0.4.22 Compiling rand_core v0.5.1 Compiling inotify v0.7.1 Compiling mio v0.6.23 Compiling sha-1 v0.8.2 Compiling rand_chacha v0.3.1 Compiling digest v0.10.3 Compiling chrono v0.4.19 Compiling rand_chacha v0.2.2 Compiling ctrlc v3.2.2 Compiling env_logger v0.9.0 Compiling parse-zoneinfo v0.3.0 Compiling svg_metadata v0.4.2 Compiling gh-emoji v1.0.6 Compiling sha2 v0.10.2 Compiling rand v0.8.5 Compiling mio-extras v2.0.6 Compiling ring v0.16.20 Compiling onig_sys v69.8.0 Compiling libwebp-sys v0.4.2 Compiling rand v0.7.3 Compiling nom_locate v1.0.0 Compiling nom_locate v2.1.0 Compiling notify v4.0.17 Compiling phf_generator v0.10.0 Compiling phf_codegen v0.10.0 Compiling string_cache_codegen v0.5.2 Compiling chrono-tz-build v0.0.2 Compiling ws v0.9.2 Compiling pest_generator v2.1.3 Compiling markup5ever v0.11.0 Compiling chrono-tz v0.6.1 Compiling onig v6.3.2 Compiling thiserror-impl v1.0.31 Compiling clap_derive v3.2.7 Compiling pin-project-internal v1.0.11 Compiling html5ever v0.26.0 Compiling nom-tracable-macros v0.5.2 Compiling derive_more v0.99.17 Compiling pest_derive v2.1.0 Compiling jpeg-decoder v0.2.6 Compiling tokio-util v0.7.3 Compiling webpki v0.22.0 Compiling sct v0.7.0 Compiling h2 v0.3.13 Compiling webpki-roots v0.22.4 Compiling tiff v0.7.2 Compiling nom-tracable v0.5.2 Compiling nom-bibtex v0.3.0 Compiling pin-project v1.0.11 Compiling flume v0.10.13 Compiling thiserror v1.0.31 Compiling exr v1.4.2 Compiling clap v3.2.12 Compiling css-minify v0.2.2 Compiling tokio-rustls v0.23.4 Compiling minify-html v0.9.2 Compiling hyper v0.14.20 Compiling image v0.24.2 Compiling clap_complete v3.2.3 Compiling bincode v1.3.3 Compiling bstr v0.2.17 Compiling lindera-decompress v0.13.5 Compiling toml v0.5.9 Compiling string_cache v0.8.4 Compiling plist v1.3.1 Compiling serde_urlencoded v0.7.1 Compiling rust-stemmers v1.2.0 Compiling serde_yaml v0.8.26 Compiling hyper-rustls v0.23.0 Compiling reqwest v0.11.11 Compiling sass-rs v0.2.2 Compiling lindera-core v0.13.5 Compiling csv v1.1.6 Compiling globset v0.4.9 Compiling quickxml_to_serde v0.5.0 Compiling syntect v5.0.0 Compiling winres v0.1.12 Compiling ignore v0.4.18 Compiling lindera-ipadic-builder v0.13.5 Compiling lindera-dictionary v0.13.5 Compiling lindera-cc-cedict-builder v0.13.5 Compiling lindera-ko-dic-builder v0.13.5 Compiling lindera-unidic-builder v0.13.5 Compiling zola v0.16.0 (/tmp/tmp.85eEyYkfsO/zola-0.16.0) Compiling globwalk v0.8.1 Compiling tera v1.16.0 Compiling lindera-ipadic v0.13.5 Compiling webp v0.2.2 Compiling ammonia v3.2.0 Compiling lindera v0.13.5 error[E0599]: no variant or associated item named `DictionaryTypeError` found for enum `lindera_core::error::LinderaErrorKind` in the current scope --> /home/hiroki/.cargo/registry/src/github.com-1ecc6299db9ec823/lindera-0.13.5/src/tokenizer.rs:64:40 | 64 | _ => Err(LinderaErrorKind::DictionaryTypeError | ^^^^^^^^^^^^^^^^^^^ | | | variant or associated item not found in `lindera_core::error::LinderaErrorKind` | help: there is a variant with a similar name: `DictionaryLoadError` error[E0599]: no variant or associated item named `UserDictionaryTypeError` found for enum `lindera_core::error::LinderaErrorKind` in the current scope --> /home/hiroki/.cargo/registry/src/github.com-1ecc6299db9ec823/lindera-0.13.5/src/tokenizer.rs:84:40 | 84 | _ => Err(LinderaErrorKind::UserDictionaryTypeError | ^^^^^^^^^^^^^^^^^^^^^^^ variant or associated item not found in `lindera_core::error::LinderaErrorKind` For more information about this error, try `rustc --explain E0599`. error: could not compile `lindera` due to 2 previous errors warning: build failed, waiting for other jobs to finish... error: build failed ```

Step to reproduce

wget https://github.com/getzola/zola/archive/refs/tags/v0.16.0.tar.gz
tar xf v0.16.0.tar.gz
cd zola-0.16.0
cargo build --features indexing-ja
Keats commented 2 years ago

I think this is an upstream bug in https://github.com/mattico/elasticlunr-rs ?

toku-sa-n commented 2 years ago

Ah, yes. I'll create a report for the upstream. Thank you.

uasi commented 2 years ago

@toku-sa-n hi, I found the root cause and proposed a fix to the upstream. https://github.com/mattico/elasticlunr-rs/pull/47

toku-sa-n commented 2 years ago

Thank you, I confirmed it.