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

Can I rename a package? #89

Closed
liuyxpp opened this issue Aug 20, 2024 · 1 comment
Closed

Can I rename a package? #89

liuyxpp opened this issue Aug 20, 2024 · 1 comment

Comments

@liuyxpp
Copy link

liuyxpp commented Aug 20, 2024

Currently, it seems rename a package is not allowed. I get the following message:

...
HEAD is now at 0f6f130 New version: MyPackageNew v0.1.0
Already on 'main'
Your branch is up to date with 'origin/main'.
ERROR: Changing package name is not supported.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] do_register(package::Nothing, registry::Nothing; commit::Bool, push::Bool, branch::Nothing, repo::Nothing, ignore_reregistration::Bool, allow_package_dirty::Bool, gitconfig::Dict{Any, Any}, create_gitlab_mr::Bool)
   @ LocalRegistry ~/.julia/packages/LocalRegistry/WR3PJ/src/LocalRegistry.jl:345
 [3] do_register
   @ ~/.julia/packages/LocalRegistry/WR3PJ/src/LocalRegistry.jl:191 [inlined]
 [4] #register#2
   @ ~/.julia/packages/LocalRegistry/WR3PJ/src/LocalRegistry.jl:184 [inlined]
 [5] register
   @ ~/.julia/packages/LocalRegistry/WR3PJ/src/LocalRegistry.jl:181 [inlined]
 [6] register()
   @ LocalRegistry ~/.julia/packages/LocalRegistry/WR3PJ/src/LocalRegistry.jl:181
 [7] top-level scope
   @ REPL[2]:1

I cannot find any help to resolve this issue. How can I register the renamed package? Do I have to delete the old package manually? Thanks!

@GunnarFarneback
Copy link
Owner

The easiest way to rename a package is to change both its name and its uuid. The latter means it's really a different package, but what goals do you have with keeping the uuid that wouldn't work with changing it?

@liuyxpp liuyxpp closed this as completed Aug 21, 2024
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

2 participants