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

implement --stdin #95

Merged
merged 2 commits into from
Mar 5, 2021
Merged

implement --stdin #95

merged 2 commits into from
Mar 5, 2021

Conversation

zimbatm
Copy link
Member

@zimbatm zimbatm commented Mar 4, 2021

A first pass at making --stdin work.

There is quite a bit of repetition with the normal mode but I didn't feel like factoring things too much out at the moment.

Regarding the tempfile, I was looking at https://docs.rs/tempfile/3.0.7/tempfile/ but it doesn't support specifying the file extension.

A first pass at making --stdin work
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2021

🤠 Cargo bloat for toolchain stable-x86_64-unknown-linux-gnu 🤠

@@ Size breakdown @@

- Size       4.08 MB
+ Size       4.13 MB  +52.52 KB
- Text Size  1.62 MB
+ Text Size  1.66 MB  +32.08 KB
Size difference per crate

Note: The numbers below are not 100% accurate, use them as a rough estimate.

@@ Breakdown per crate @@

- std          540.95 KB
+ std          550.06 KB
- treefmt      105.3 KB
+ treefmt      112.55 KB
+ rand_chacha  7.38 KB
+ directories  4.97 KB
+ getrandom    1.37 KB
+ rand_core    798 B
- same_file    203 B
Dependency tree
@@ Dependency tree @@
- Count: 132
+ Count: 145

  ├─ anyhow v1.0.38
  ├─ console v0.13.0
  │  ├─ lazy_static v1.4.0
  │  ├─ libc v0.2.86
  │  ├─ regex v1.4.3
  │  │  ├─ aho-corasick v0.7.15
  │  │  │  └─ memchr v2.3.4
  │  │  ├─ memchr v2.3.4
  │  │  ├─ regex-syntax v0.6.22
  │  │  └─ thread_local v1.1.3
  │  │     └─ once_cell v1.5.2
  │  ├─ terminal_size v0.1.16
  │  │  └─ libc v0.2.86
  │  └─ unicode-width v0.1.8
  ├─ directories v3.0.1
  │  └─ dirs-sys v0.3.5
  │     └─ libc v0.2.86
  ├─ filetime v0.2.14
  │  ├─ cfg-if v1.0.0
  │  └─ libc v0.2.86
  ├─ globset v0.4.6
  │  ├─ aho-corasick v0.7.15 
  │  ├─ bstr v0.2.15
  │  │  ├─ lazy_static v1.4.0
  │  │  ├─ memchr v2.3.4
  │  │  ├─ regex-automata v0.1.9
  │  │  │  └─ byteorder v1.4.2
  │  │  └─ serde v1.0.123
  │  │     └─ serde_derive v1.0.123 (proc-macro)
  │  │        ├─ proc-macro2 v1.0.24
  │  │        │  └─ unicode-xid v0.2.1
  │  │        ├─ quote v1.0.9
  │  │        │  └─ proc-macro2 v1.0.24 
  │  │        └─ syn v1.0.60
  │  │           ├─ proc-macro2 v1.0.24 
  │  │           ├─ quote v1.0.9 
  │  │           └─ unicode-xid v0.2.1
  │  ├─ fnv v1.0.7
  │  ├─ log v0.4.14
  │  │  └─ cfg-if v1.0.0
  │  └─ regex v1.4.3 
  ├─ ignore v0.4.17
  │  ├─ crossbeam-utils v0.8.1
  │  │  ├─ cfg-if v1.0.0
  │  │  ├─ lazy_static v1.4.0
  │  │  └─ autocfg v1.0.1
  │  ├─ globset v0.4.6 
  │  ├─ lazy_static v1.4.0
  │  ├─ log v0.4.14 
  │  ├─ memchr v2.3.4
  │  ├─ regex v1.4.3 
  │  ├─ same-file v1.0.6
  │  ├─ thread_local v1.1.3 
  │  └─ walkdir v2.3.1
  │     └─ same-file v1.0.6
  ├─ log v0.4.14 
  ├─ path-clean v0.1.0
  ├─ rayon v1.5.0
  │  ├─ crossbeam-deque v0.8.0
  │  │  ├─ cfg-if v1.0.0
  │  │  ├─ crossbeam-epoch v0.9.1
  │  │  │  ├─ cfg-if v1.0.0
  │  │  │  ├─ const_fn v0.4.5 (proc-macro)
  │  │  │  ├─ crossbeam-utils v0.8.1 
  │  │  │  ├─ lazy_static v1.4.0
  │  │  │  ├─ memoffset v0.6.1
  │  │  │  │  └─ autocfg v1.0.1
  │  │  │  └─ scopeguard v1.1.0
  │  │  └─ crossbeam-utils v0.8.1 
  │  ├─ either v1.6.1
  │  ├─ rayon-core v1.9.0
  │  │  ├─ crossbeam-channel v0.5.0
  │  │  │  ├─ cfg-if v1.0.0
  │  │  │  └─ crossbeam-utils v0.8.1 
  │  │  ├─ crossbeam-deque v0.8.0 
  │  │  ├─ crossbeam-utils v0.8.1 
  │  │  ├─ lazy_static v1.4.0
  │  │  └─ num_cpus v1.13.0
  │  │     └─ libc v0.2.86
  │  └─ autocfg v1.0.1
  ├─ serde v1.0.123 
  ├─ serde_json v1.0.62
  │  ├─ itoa v0.4.7
  │  ├─ ryu v1.0.5
  │  └─ serde v1.0.123 
  ├─ sha-1 v0.9.3
  │  ├─ block-buffer v0.9.0
  │  │  └─ generic-array v0.14.4
  │  │     ├─ typenum v1.12.0
  │  │     └─ version_check v0.9.2
  │  ├─ cfg-if v1.0.0
  │  ├─ cpuid-bool v0.1.2
  │  ├─ digest v0.9.0
  │  │  └─ generic-array v0.14.4 
  │  └─ opaque-debug v0.3.0
  ├─ structopt v0.3.21
  │  ├─ clap v2.33.3
  │  │  ├─ ansi_term v0.11.0
  │  │  ├─ atty v0.2.14
  │  │  │  └─ libc v0.2.86
  │  │  ├─ bitflags v1.2.1
  │  │  ├─ strsim v0.8.0
  │  │  ├─ textwrap v0.11.0
  │  │  │  └─ unicode-width v0.1.8
  │  │  ├─ unicode-width v0.1.8
  │  │  └─ vec_map v0.8.2
  │  ├─ lazy_static v1.4.0
  │  └─ structopt-derive v0.4.14 (proc-macro)
  │     ├─ heck v0.3.2
  │     │  └─ unicode-segmentation v1.7.1
  │     ├─ proc-macro-error v1.0.4
  │     │  ├─ proc-macro-error-attr v1.0.4 (proc-macro)
  │     │  │  ├─ proc-macro2 v1.0.24 
  │     │  │  ├─ quote v1.0.9 
  │     │  │  └─ version_check v0.9.2
  │     │  ├─ proc-macro2 v1.0.24 
  │     │  ├─ quote v1.0.9 
  │     │  ├─ syn v1.0.60 
  │     │  └─ version_check v0.9.2
  │     ├─ proc-macro2 v1.0.24 
  │     ├─ quote v1.0.9 
  │     └─ syn v1.0.60 
+ ├─ tempfile v3.2.0
+ │  ├─ cfg-if v1.0.0
+ │  ├─ libc v0.2.86
+ │  ├─ rand v0.8.3
+ │  │  ├─ libc v0.2.86
+ │  │  ├─ rand_chacha v0.3.0
+ │  │  │  ├─ ppv-lite86 v0.2.10
+ │  │  │  └─ rand_core v0.6.2
+ │  │  │     └─ getrandom v0.2.2
+ │  │  │        ├─ cfg-if v1.0.0
+ │  │  │        └─ libc v0.2.86
+ │  │  └─ rand_core v0.6.2 
+ │  └─ remove_dir_all v0.5.3
  ├─ toml v0.5.8
  │  └─ serde v1.0.123 
  └─ which v4.0.2
     ├─ libc v0.2.86
     └─ thiserror v1.0.23
        └─ thiserror-impl v1.0.23 (proc-macro)
           ├─ proc-macro2 v1.0.24 
           ├─ quote v1.0.9 
           └─ syn v1.0.60 

Commit: eb30c54 (Compare with baseline commit)

@zimbatm zimbatm merged commit 8de1add into master Mar 5, 2021
@zimbatm zimbatm deleted the stdin-mode branch March 5, 2021 09:49
@zimbatm zimbatm mentioned this pull request Mar 5, 2021
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.

1 participant