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

Remove unnecessary dependencies #5

Open
nikhilr612 opened this issue Jul 6, 2024 · 2 comments
Open

Remove unnecessary dependencies #5

nikhilr612 opened this issue Jul 6, 2024 · 2 comments

Comments

@nikhilr612
Copy link
Owner

The crate pretty_env_logger was added ad-hoc for momentary logging needs. A custom, non-fancy logger can be used since in most cases detailed logging within the crate is not required as much as clear, structured reporting to the user. Colors and formatting can be achieved by leveraging colored, or termcolor crates.
Moreover, certain tertiary dependencies like atty have introduced security alerts.
The dependencies need to be culled after careful consideration.

@nikhilr612
Copy link
Owner Author

nikhilr612 commented Jul 8, 2024

Current dependency tree

freya v0.2.7
├── clap v4.5.4
│   ├── clap_builder v4.5.2
│   │   ├── anstream v0.6.14
│   │   │   ├── anstyle v1.0.7
│   │   │   ├── anstyle-parse v0.2.4
│   │   │   │   └── utf8parse v0.2.1
│   │   │   ├── anstyle-query v1.0.3
│   │   │   │   └── windows-sys v0.52.0
│   │   │   │       └── windows-targets v0.52.5
│   │   │   │           └── windows_x86_64_msvc v0.52.5
│   │   │   ├── anstyle-wincon v3.0.3
│   │   │   │   ├── anstyle v1.0.7
│   │   │   │   └── windows-sys v0.52.0 (*)
│   │   │   ├── colorchoice v1.0.1
│   │   │   ├── is_terminal_polyfill v1.70.0
│   │   │   └── utf8parse v0.2.1
│   │   ├── anstyle v1.0.7
│   │   ├── clap_lex v0.7.0
│   │   └── strsim v0.11.1
│   └── clap_derive v4.5.4 (proc-macro)
│       ├── heck v0.5.0
│       ├── proc-macro2 v1.0.84
│       │   └── unicode-ident v1.0.6
│       ├── quote v1.0.36
│       │   └── proc-macro2 v1.0.84 (*)
│       └── syn v2.0.66
│           ├── proc-macro2 v1.0.84 (*)
│           ├── quote v1.0.36 (*)
│           └── unicode-ident v1.0.6
├── glob v0.3.1
├── libloading v0.8.3
│   └── windows-targets v0.52.5 (*)
├── log v0.4.22
├── memmap2 v0.9.4
├── paste v1.0.15 (proc-macro)
├── pretty_env_logger v0.4.0
│   ├── env_logger v0.7.1
│   │   ├── atty v0.2.14
│   │   │   └── winapi v0.3.9
│   │   ├── humantime v1.3.0
│   │   │   └── quick-error v1.2.3
│   │   ├── log v0.4.22
│   │   ├── regex v1.10.5
│   │   │   ├── aho-corasick v1.1.3
│   │   │   │   └── memchr v2.7.4
│   │   │   ├── memchr v2.7.4
│   │   │   ├── regex-automata v0.4.7
│   │   │   │   ├── aho-corasick v1.1.3 (*)
│   │   │   │   ├── memchr v2.7.4
│   │   │   │   └── regex-syntax v0.8.4
│   │   │   └── regex-syntax v0.8.4
│   │   └── termcolor v1.4.1
│   │       └── winapi-util v0.1.8
│   │           └── windows-sys v0.52.0 (*)
│   └── log v0.4.22
└── threadpool v1.8.1
    └── num_cpus v1.16.0

clap and env_logger are bringing in the most dependencies down the line.
regex is also an unnecessary secondary dependency

@nikhilr612
Copy link
Owner Author

On the matter of coloured text output, anstream, and yansi seem like good candidates.

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

1 participant