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

Resolve local relative links relative if output format is tex #158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oberien
Copy link
Owner

@oberien oberien commented Nov 3, 2020

No description provided.

@oberien oberien requested a review from HeroicKatora November 3, 2020 17:22
@HeroicKatora
Copy link
Collaborator

Strange things are happening if you use this with a path outside the project root:

./target/debug/heradoc test.md  --relative-to /tmp --output-type tex
Internal compiler error, repeats a bunch of times
error: internal compiler error: Local project-root-relative path resolved to non-project-root-relative path
note: please report this
note: in heradoc file Some("/home/andreas/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.42/src/backtrace/libunwind.rs") name Some(backtrace::backtrace::libunwind::trace::ha5bd93d32bea7d8d) line Some(86) address Some(0x55cfce6f3f53)
note: in heradoc file Some("/home/andreas/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.42/src/backtrace/mod.rs") name Some(backtrace::backtrace::trace_unsynchronized::h954f867c48f312f2) line Some(66) address Some(0x55cfce6f3f53)
note: in heradoc file Some("/home/andreas/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.42/src/backtrace/mod.rs") name Some(backtrace::backtrace::trace::h97b16aa9e76a92b6) line Some(53) address Some(0x55cfce6f3ff6)
note: in heradoc file Some("src/diagnostics.rs") name Some(heradoc::diagnostics::Diagnostics::bug::he9f68a012952c0f4) line Some(77) address Some(0x55cfce743eb6)
note: in heradoc file Some("src/resolve/target.rs") name Some(heradoc::resolve::target::TargetChecked::into_include::{{closure}}::he15c9159c21895b8) line Some(277) address Some(0x55cfce745c92)
note: in heradoc file Some("src/resolve/target.rs") name Some(heradoc::resolve::target::TargetChecked::into_include::h11a4437a77244619) line Some(315) address Some(0x55cfce737afd)
note: in heradoc file Some("src/resolve/mod.rs") name Some(heradoc::resolve::Resolver::resolve::hf73925dfb0fad67b) line Some(74) address Some(0x55cfce73eff6)
note: in heradoc file Some("src/generator/mod.rs") name Some(heradoc::generator::Generator<B,W>::resolve::h25243293cbf2840a) line Some(226) address Some(0x55cfce635ad1)
note: in heradoc file Some("src/generator/iter.rs") name Some(heradoc::generator::iter::Iter::convert_event::h2a1822d176ae1f02) line Some(123) address Some(0x55cfce513907)
note: in heradoc file Some("src/generator/iter.rs") name Some(heradoc::generator::iter::Iter::next::hfdb33f07f72be919) line Some(47) address Some(0x55cfce50ba30)
note: in heradoc file Some("src/generator/iter.rs") name Some(heradoc::generator::iter::Iter::peek::ha86a012268be9423) line Some(62) address Some(0x55cfce50d9e1)
note: in heradoc file Some("src/generator/mod.rs") name Some(heradoc::generator::Generator<B,W>::generate_body::h8cb43025a573ea34) line Some(113) address Some(0x55cfce60637b)
note: in heradoc file Some("src/generator/mod.rs") name Some(heradoc::generator::Generator<B,W>::generate::h34766e9f82173201) line Some(101) address Some(0x55cfce5fc94a)
note: in heradoc file Some("src/backend/mod.rs") name Some(heradoc::backend::generate::h815664d234ab40b7) line Some(42) address Some(0x55cfce6d155f)
note: in heradoc file Some("src/main.rs") name Some(heradoc::gen_latex::h89b4bf2e404cfd3b) line Some(163) address Some(0x55cfce73acb5)
note: in heradoc file Some("src/main.rs") name Some(heradoc::main::h1ef24004a4a1437e) line Some(126) address Some(0x55cfce560207)
note: in heradoc file Some("/home/andreas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs") name Some(core::ops::function::FnOnce::call_once::h436c2a1637b982a1) line Some(227) address Some(0x55cfce6b4bfa)
note: in heradoc file Some("/home/andreas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs") name Some(std::sys_common::backtrace::__rust_begin_short_backtrace::hbf16636999899a7e) line Some(137) address Some(0x55cfce6a22ad)
note: in heradoc file Some("/home/andreas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs") name Some(std::rt::lang_start::{{closure}}::h213f4899ad5d4577) line Some(66) address Some(0x55cfce6dbec0)
note: in heradoc file Some("/rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/ops/function.rs") name Some(core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h6a3209f124be2235) line Some(259) address Some(0x55cfcf5d9940)
note: in heradoc file Some("library/std/src/panicking.rs") name Some(std::panicking::try::do_call::h88ce358792b64df0) line Some(373) address Some(0x55cfcf5d9940)
note: in heradoc file Some("library/std/src/panicking.rs") name Some(std::panicking::try::h6311c259678e50fc) line Some(337) address Some(0x55cfcf5d9940)
note: in heradoc file Some("library/std/src/panic.rs") name Some(std::panic::catch_unwind::h56c5716807d659a1) line Some(379) address Some(0x55cfcf5d9940)
note: in heradoc file Some("library/std/src/rt.rs") name Some(std::rt::lang_start_internal::h73711f37ecfcb277) line Some(51) address Some(0x55cfcf5d9940)
note: in heradoc file Some("/home/andreas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs") name Some(std::rt::lang_start::h854fccd6a00a0698) line Some(65) address Some(0x55cfce6dbe96)
note: in heradoc file None name Some("main") line None address Some(0x55cfce5610d9)
note: in heradoc file None name Some("__libc_start_main") line None address Some(0x7faad321b151)
note: in heradoc file None name Some("_start") line None address Some(0x55cfce49319d)
note: in heradoc file None name None line None address None
error: cause: prefix not found

@HeroicKatora
Copy link
Collaborator

And it complains about missing includes if you use it with a path within.
I don't think this should affect how heradoc finds paths but only affects relative paths persisted into output artifacts.

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

Successfully merging this pull request may close these issues.

2 participants