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 itertools as a dependency #730

Merged
merged 1 commit into from
Sep 26, 2019
Merged

Remove itertools as a dependency #730

merged 1 commit into from
Sep 26, 2019

Conversation

bluss
Copy link
Member

@bluss bluss commented Sep 25, 2019

We use izip!() as the only major feature from itertools, and can
remove it to save build time and two small crates as deps.

izip!() is license compatible and originally written by @krdln
(Michał Krasnoborski) and @bluss in itertools, so we copy it into the
crate.

The free functions zip(i, j) and enumerate(i) are just style
preferences, written by me, and simple to copy.

Itertools is still used as a dev-dependency.

src/layout/layoutfmt.rs Outdated Show resolved Hide resolved
@bluss
Copy link
Member Author

bluss commented Sep 25, 2019

It's no major thing, but looking at it, we didn't use much of itertools, and removing it speeds up the build by a tiny amount and removes itertools and either from the default dependency tree.

Objectively they contain a lot of code that we are not using. I guess the only debatable thing, is the validity of copying code instead of reusing, no matter how small that code piece is?

cc #723

We use `izip!()` as the only major feature from itertools, and can
remove it to save build time and two small crates as deps.

`izip!()` is license compatible and originally written by @krdln
(Michał Krasnoborski) and @bluss in itertools, so we copy it into the
crate.

The free functions zip(i, j) and enumerate(i) are just style
preferences, written by me, and simple to copy.

Itertools is still used as a dev-dependency.
@jturner314
Copy link
Member

I haven't had a chance to review this PR in detail, but I do think it's a good idea, considering how little code ndarray uses from itertools.

@bluss bluss merged commit 59eff11 into master Sep 26, 2019
@bluss bluss deleted the remove-itertools branch September 26, 2019 18:30
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.

2 participants