Commit graph

335 commits

Author SHA1 Message Date
Aleksey Kladov
ad2b6cad48 Remove npm.cmd
I *think* this is more correct
2019-11-20 23:27:03 +03:00
Aleksey Kladov
7020167aa2 Cleanup imports 2019-11-20 09:47:14 +03:00
Aleksey Kladov
76da22e66a Don't create a separate bin for format hook 2019-11-18 15:27:04 +03:00
Aleksey Kladov
c65f42325f Revert #2230
Looks like autocfg tries to do slightly more than we need (see #2231),
so let's stick with minimal home-grown solution.
2019-11-14 11:12:52 +03:00
Pascal Hertleif
5075c77957 Use anyhow::Result in xtask, add contexts
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-11-13 20:51:57 +01:00
Pascal Hertleif
5e3c1c2b5f Allow usage of CARGO_TARGET_DIR env var 2019-11-13 20:44:39 +01:00
kjeremy
06754b78ac Use autocfg to determine rust version 2019-11-13 11:19:07 -05:00
Aleksey Kladov
018255efe3 Minor cleanup 2019-11-13 10:32:53 +03:00
Aleksey Kladov
30bf7e43db Disallow regressing crate docs 2019-11-12 15:41:02 +03:00
mkucijan
d67157c0f1 Add '--scripts-prepend-node-pat' to npm run package 2019-11-11 20:51:07 +01:00
Aleksey Kladov
5efd99a6e0 Ignore line-endings when checking generated files for freshness
closes #2184
2019-11-06 12:40:28 +03:00
Aleksey Kladov
8922a44395 Add small module-level docs 2019-11-04 00:23:14 +03:00
Laurențiu Nicola
e3354c1496 Use run-time project path in xtask 2019-11-01 22:20:44 +02:00
krk
462c1b49c6 Fix typo in xtask/src/main.rs. 2019-10-30 21:17:27 +01:00
bors[bot]
ce3173469c
Merge #2132
2132: echo cargo version during install r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-10-30 17:52:02 +00:00
Aleksey Kladov
e529c8e3e2 echo cargo version during install 2019-10-30 20:49:04 +03:00
kjeremy
b441b4e8ef Some clippy fixes 2019-10-30 13:36:37 -04:00
Aleksey Kladov
cf4720ffd5 use unicode bar for drawing the cursor 2019-10-26 21:22:40 +03:00
Aleksey Kladov
a5cbd8d5e8 check style for assist docs 2019-10-26 19:08:13 +03:00
bors[bot]
65e3fc8e77
Merge #2075
2075: document a couple of assists r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-10-26 14:38:20 +00:00
Aleksey Kladov
394e474479 add blank lines for readability 2019-10-26 17:27:47 +03:00
bors[bot]
fa4ccc5fef
Merge #2074
2074: document tasks module r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-10-26 14:25:35 +00:00
Aleksey Kladov
e3a253d80f document tasks module 2019-10-26 17:20:44 +03:00
bors[bot]
75cd15c84f
Merge #2073
2073: warn if npm is not found r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-10-26 14:13:21 +00:00
Aleksey Kladov
8e8b6e7f62 warn if npm is not found 2019-10-26 17:12:56 +03:00
Aleksey Kladov
d385438bcc generate more assists docs 2019-10-25 23:38:15 +03:00
Aleksey Kladov
0dd35ff2b2 auto-generate assists docs and tests 2019-10-25 14:47:48 +03:00
Aleksey Kladov
a40d02c9eb refactor comment extraction from tasks 2019-10-24 19:29:38 +03:00
Aleksey Kladov
a409a12f1b simplify 2019-10-24 19:19:22 +03:00
Aleksey Kladov
6048d29400 xtask: don't depend on itertools
xtask should be fast to compiler, as it's a gateway to rust-analyzer
2019-10-23 18:57:18 +03:00
Aleksey Kladov
a669049ef3 xtask: fold gen-tests and gen-ast into codegen 2019-10-23 18:57:18 +03:00
Aleksey Kladov
b5f13d8d51 xtask: move codegen to a module 2019-10-23 18:57:18 +03:00
Aleksey Kladov
4aa7873588 try to warn about old rust 2019-10-21 13:40:40 +03:00
Aleksey Kladov
5376c769f0 rename tools -> xtask 2019-10-17 23:14:05 +03:00
Aleksey Kladov
7b15c4f7ae WIP: move to xtasks 2019-10-17 22:54:38 +03:00