Skip to content
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

Panic when highlight_code = true in config.toml #92

Closed
pka opened this issue Jun 27, 2017 · 1 comment
Closed

Panic when highlight_code = true in config.toml #92

pka opened this issue Jun 27, 2017 · 1 comment

Comments

@pka
Copy link
Contributor

pka commented Jun 27, 2017

config.toml:

title = "example"
base_url = "http://example.com/"
highlight_code = true

gutenberg serve:

Building site...
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Custom("invalid value: integer `4284898127`, expected variant index 0 <= i < 4")', /checkout/src/libcore/result.rs:859
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at /checkout/src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/sys_common/backtrace.rs:60
             at /checkout/src/libstd/panicking.rs:355
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:371
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:549
   5: std::panicking::begin_panic
             at /checkout/src/libstd/panicking.rs:511
   6: std::panicking::begin_panic_fmt
             at /checkout/src/libstd/panicking.rs:495
   7: rust_begin_unwind
             at /checkout/src/libstd/panicking.rs:471
   8: core::panicking::panic_fmt
             at /checkout/src/libcore/panicking.rs:69
   9: core::result::unwrap_failed
  10: std::sync::once::Once::call_once::{{closure}}
  11: std::sync::once::Once::call_inner
             at /checkout/src/libstd/sync/once.rs:307
  12: gutenberg::rendering::markdown::markdown_to_html::{{closure}}
  13: <core::iter::Map<I, F> as core::iter::iterator::Iterator>::next
  14: gutenberg::rendering::markdown::markdown_to_html
  15: gutenberg::content::page::Page::render_markdown
  16: gutenberg::site::Site::load
  17: gutenberg::cmd::serve::serve
  18: gutenberg::main
  19: __rust_maybe_catch_panic
             at /checkout/src/libpanic_unwind/lib.rs:98
  20: std::rt::lang_start
             at /checkout/src/libstd/panicking.rs:433
             at /checkout/src/libstd/panic.rs:361
             at /checkout/src/libstd/rt.rs:57
  21: __libc_start_main
  22: <unknown>

Without last line in config.toml, the server is working. I couldn't find out which content page is triggering the error.

Gutenberg 0.0.7 - installed with cargo install gutenberg on Linux.

@Keats
Copy link
Collaborator

Keats commented Jun 28, 2017

That's this issue in Cargo: rust-lang/cargo#2263 where it doesn't use lock files for binaries. Syntect had a new version published with a new format for syntax - a breaking change - as a minor version.

I will stop publishing on crates.io when reaching 0.1.0 if this issue is not resolved by then since it seems to cause issues.

@Keats Keats closed this as completed Jun 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants