Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

Rename package #104

Closed
iamed2 opened this issue Jun 12, 2017 · 25 comments · Fixed by #105
Closed

Rename package #104

iamed2 opened this issue Jun 12, 2017 · 25 comments · Fixed by #105

Comments

@iamed2
Copy link
Collaborator

iamed2 commented Jun 12, 2017

Perhaps to IterTools.jl?

JuliaLang/julia#21969 isn't fixed so devs are removing Iterators.jl dependencies in favour of copying code in (e.g. JuliaMath/Combinatorics.jl#49). This has been a headache ever since the introduction of Base.Iterators and at this point the easiest solution might be to rename this package (with a redirect or pointer from the old name to the new name so existing dependencies aren't affected).

@tkelman thoughts?

@tkelman
Copy link
Contributor

tkelman commented Jun 12, 2017

I knew using the same module name in base was a bad idea.

Would be effectively a new registration under the new name, either via a repo rename or copying the code (and history?) to a new repo.

@iamed2
Copy link
Collaborator Author

iamed2 commented Jun 12, 2017

So steps might be:

  1. Copy the repo and mess with the git history so it was always called IterTools.jl
  2. Push to JuliaCollections/IterTools.jl
  3. Register that package on METADATA including all the old tags
  4. Add deprecations to JuliaCollections/Iterators.jl with something like an init method that shows a deprecation warning pointing to the new package and a big note on the README, and tag that version as the last

@davidanthoff
Copy link

  1. Copy the repo and mess with the git history so it was always called IterTools.jl

You could just copy the repo and delete all tags, and then start with a new and fresh v0.1.1. That way you wouldn't have to mess with the history at all, there would just be a lot of commits in the repo before the first tag in which the package had a different name, but those should do no harm.

@ararslan
Copy link
Member

One of the JuliaStats packages has been named MCMC, Lora, and now Klara, so we could take inspiration from however that was done.

@tkelman
Copy link
Contributor

tkelman commented Jun 12, 2017

In that case the author really wanted to keep the issues, PRs, and github stars associated with the new name, so it was done in not the greatest way. I don't think that's all that important here?

@iamed2
Copy link
Collaborator Author

iamed2 commented Jun 12, 2017

You could just copy the repo and delete all tags, and then start with a new and fresh v0.1.1. That way you wouldn't have to mess with the history at all, there would just be a lot of commits in the repo before the first tag in which the package had a different name, but those should do no harm.

It would be nice if packages could still depend on old versions but use the new package, requiring minimal updates for package devs.

@tkelman
Copy link
Contributor

tkelman commented Jun 12, 2017

If you want to mess with the history like that in a new separate not-yet-registered repo, go ahead. The only package that has upper bounded Iterators is NURBS.jl.

@iamed2
Copy link
Collaborator Author

iamed2 commented Jun 12, 2017

The only package that has upper bounded Iterators is NURBS.jl

That's a good fact to know!

@ararslan
Copy link
Member

We should definitely do this, preferably in short order, as the name conflict with Base is causing all sorts of annoying issues and there will soon be a 0.6.0 release (presumably).

@iamed2
Copy link
Collaborator Author

iamed2 commented Jun 15, 2017

Alright, I'll get on it now

@ararslan
Copy link
Member

Thanks so much, @iamed2, much appreciated!

@iamed2
Copy link
Collaborator Author

iamed2 commented Jun 15, 2017

JuliaLang/METADATA.jl#9825

I found a tool for issue migration but I am having trouble installing it at the moment.

@musm
Copy link

musm commented Jun 15, 2017

Is it not possible to just fix the underlying issue, instead of trying to sort out a temporary work around (or is the underlying issue too complex to properly resolve)? IMO it is probably pretty confusing to be first recommended to transition to Iterators and then IterTools within basically the same cycle.

@iamed2
Copy link
Collaborator Author

iamed2 commented Jun 15, 2017

IMO it is probably pretty confusing to be first recommended to transition to Iterators

I'm not sure what transition recommendation you're referring to here.

Is it not possible to just fix the underlying issue, instead of trying to sort out a temporary work around (or is the underlying issue too complex to properly resolve)?

There have been a few attempts (this first reared its head with Dates) but continued issues. I expect the underlying issue to be solved eventually, but in the meantime this works. It's also just confusing to have a package with the same name as a Base module (if someone says "Iterators" it's not clear which they mean).

@ararslan
Copy link
Member

I expect the underlying issue to be solved eventually

Indeed, though in this case the underlying issue hasn't even yet been concretely identified.

@musm
Copy link

musm commented Jun 15, 2017

IMO it is probably pretty confusing to be first recommended to transition to Iterators

I'm not sure what transition recommendation you're referring to here.

I was referring to first being told to utilize the Iterators package for functionality that was moved from Base and then to now be recommended to use IterTools package

@iamed2
Copy link
Collaborator Author

iamed2 commented Jun 15, 2017

I was referring to first being told to utilize the Iterators package for functionality that was moved from Base

When did this happen, and for what functionality? Since 0.4 I can only recall the shift from e.g. Base.filter to Base.Iterators.filter.

@tkelman
Copy link
Contributor

tkelman commented Jun 15, 2017

In this case Base added an Iterators module. There was review on the PR that did that warning that using the same module name as an existing package was likely to cause problems. But the same name was used anyway.

@ararslan
Copy link
Member

It's the better name; Base deserves to have it. We just need to rename here, a task which Eric has valiantly undertaken.

@prairie-guy
Copy link

I am using julia 0.60 and working with packages: Combinatorics, Iterators and Base.Iterators. As has been described here, Combinatorics requires Iterators, which overwrites Base.Iterators.

It appears that a long term solution is being pursued here. In the meantime, how would I be able to 1) Use Combinatorics, Iterators and Base.Iterators simultaneous and 2) Be able to preserve a module for structure (so I can use tab-completion). Ideally, I would do something like: using Iterators as Iter

(I've looked though the "Closed Issues" and wasn't able to find a solution. I am sorry if I missed it and am wasting your time here. Any advice appreciated.)

Thanks

@iamed2
Copy link
Collaborator Author

iamed2 commented Jun 22, 2017

@prairie-guy We have created IterTools.jl. The current path forward is to get Combinatorics using IterTools and Base.Iterators where appropriate, and deprecate "Iterators.jl". That will happen in the next few days at JuliaCon :)

@musm
Copy link

musm commented Jun 22, 2017

aside: I know IterTools is based on the python module itertools but isn't the Julia naming guideline explicit regarding the recommendation to spell out names, e.g BenchmarkTools. Wouldn't' IteratorTools be more appropriate (just thought I'd point this out, because it has been an issue in the past)

@prairie-guy
Copy link

prairie-guy commented Jun 22, 2017

@iamed2 Wow talk about a quick response! Thanks much.

After using Combinatorics, IterTools, I have the following:
IterTools -> Iterators.jl (original package)
Iterators -> Iterators.jl (original package)
Base.Iterators - > Base.Iterators

Now if I can only figure out how to stop the pre-compilation error from using Combinatorics mentioned previously in this chain . . .

@iamed2
Copy link
Collaborator Author

iamed2 commented Jun 22, 2017

Once we make a PR to Combinatorics, it will no longer contain and import Iterators.jl and will instead have IterTools.jl, so you'll have:

IterTools -> IterTools.jl
Iterators -> Base.Iterators
Base.Iterators - > Base.Iterators

@prairie-guy
Copy link

prairie-guy commented Jun 22, 2017

Will be following JuliaCon for other interesting updates on Julia! Thanks again.

martinholters added a commit to HSU-ANT/ACME.jl that referenced this issue Jun 23, 2017
Iterators has been renamed to IterTools
(JuliaCollections/Iterators.jl#104), so update accordingly.
benhemingway added a commit to benhemingway/BasisMatrices.jl that referenced this issue Jul 20, 2017
Iterators.jl has been deprecated in favour of IterTools.jl.
See: JuliaCollections/Iterators.jl#104 for more information
benhemingway added a commit to benhemingway/BasisMatrices.jl that referenced this issue Jul 20, 2017
Iterators.jl has been deprecated in favour of IterTools.jl.
See: JuliaCollections/Iterators.jl#104 for more information
sglyon pushed a commit to QuantEcon/BasisMatrices.jl that referenced this issue Jul 20, 2017
* Iterations.jl replaced by IterTools.jl

Iterators.jl has been deprecated in favour of IterTools.jl.
See: JuliaCollections/Iterators.jl#104 for more information

* Iterators.jl replaced by IterTools.jl

Iterators.jl has been deprecated in favour of IterTools.jl.
See: JuliaCollections/Iterators.jl#104 for more information
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants