about summary refs log tree commit diff
path: root/xtask/src/codegen/gen_parser_tests.rs
AgeCommit message (Collapse)AuthorLines
2019-11-13Use anyhow::Result in xtask, add contextsPascal Hertleif-2/+2
This builds on #2231 but was actually done before that. You see, the cause for #2231 was that I got this error message: Error: Error { kind: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" }) } Just switching to `anyhow::Result` got me stack traces (when setting `RUST_LIB_BACKTRACE=1`) that at least showed stack backtrace: 0: std::backtrace::Backtrace::create 1: std::backtrace::Backtrace::capture 2: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from 3: xtask::install_server 4: xtask::install 5: xtask::main 6: std::rt::lang_start::{{closure}} 7: std::panicking::try::do_call 8: __rust_maybe_catch_panic 9: std::rt::lang_start_internal 10: std::rt::lang_start 11: main With the added contexts (not at all exhaustive), the error became Error: install server Caused by: 0: build AutoCfg with target directory 1: No such file or directory (os error 2) Since anyhow is such a small thing (no new transitive dependencies!), and in general gives you `Result<T, Box<dyn Error>>` on steroids, I think this a nice small change. The only slightly annoying thing was to replace all the `Err(format!(…))?` calls (haven't even looked at whether we can make it support wrapping strings though), but the `bail!` macro is shorter anyway :)
2019-10-30Some clippy fixeskjeremy-5/+3
2019-10-24refactor comment extraction from tasksAleksey Kladov-38/+20
2019-10-24simplifyAleksey Kladov-14/+13
2019-10-23xtask: don't depend on itertoolsAleksey Kladov-17/+22
xtask should be fast to compiler, as it's a gateway to rust-analyzer
2019-10-23xtask: move codegen to a moduleAleksey Kladov-0/+150