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

web-sys shouldn't use env_logger #1580

Closed
Pauan opened this issue Jun 8, 2019 · 1 comment · Fixed by #1586
Closed

web-sys shouldn't use env_logger #1580

Pauan opened this issue Jun 8, 2019 · 1 comment · Fixed by #1586

Comments

@Pauan
Copy link
Contributor

Pauan commented Jun 8, 2019

Motivation

When using web-sys, it pulls in the env_logger dependency, which in turn pulls in all of these dependencies:

aho-corasick
atty
humantime
quick-error
regex
regex-syntax
termcolor
termion
thread_local
ucd-util
utf8-ranges
winapi
winapi-util
wincolor

This means that even a simple "hello world" app takes a lot longer to compile.

As far as I can tell, env_logger isn't actually needed, it's solely for debugging. So I propose that it be hidden behind a Cargo --feature, so that way it doesn't affect people who don't need the logging.

alexcrichton added a commit to alexcrichton/wasm-bindgen that referenced this issue Jun 10, 2019
Only used during development no need to pull in its set of features when
typically compiled as a dependency of other crates!

Closes rustwasm#1580
@alexcrichton
Copy link
Contributor

An excellent idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants