# Adjusting structure of registered package

**URL:** <https://discourse.julialang.org/t/adjusting-structure-of-registered-package/122948>\
**Category:** Package Management\
**Created:** [November 22, 2024, 10:49am UTC](https://discourse.julialang.org/t/adjusting-structure-of-registered-package/122948 "2024-11-22T10:49:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pablo\_Marchant](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pablo_marchant/32/32828_2.png) [@Pablo\_Marchant](https://discourse.julialang.org/u/Pablo_Marchant)\
**Post date:** [November 22, 2024, 10:49am UTC](https://discourse.julialang.org/t/adjusting-structure-of-registered-package/122948/1 "2024-11-22T10:49:15Z")

</div>

Hi all,

I have a registered package ([GitHub - orlox/StarStats.jl](https://github.com/orlox/StarStats.jl)) which I initially setup such that the source for the package was contained in a subdirectory (see here, package itself is in the directory StarStats: [GitHub - orlox/StarStats.jl at 07ab303f9074c0b51bdd026c3740d9a89a140d2b](https://github.com/orlox/StarStats.jl/tree/07ab303f9074c0b51bdd026c3740d9a89a140d2b)). I’m not much of a fan of that structure now, so I changed things such that the package now lives in the root of the repository. I imagined the registrator bot would not be very happy about it, and indeed it complained because of an unallowed modification:

> <https://github.com/JuliaRegistries/General/pull/119528>
>
> \- Registering package: StarStats
> \- Repository: https://github.com/orlox/StarStat…s.jl
> \- Created by: @orlox
> \- Version: v0.13.0
> \- Commit: aae442cfca83489ab5043548eef5175f4b2504bb
> \- Reviewed by: @orlox
> \- Reference: https://github.com/orlox/StarStats.jl/issues/10

Is there some way to perform this change, or should I remain with the old package structure?

---

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [November 22, 2024, 11:43am UTC](https://discourse.julialang.org/t/adjusting-structure-of-registered-package/122948/2 "2024-11-22T11:43:17Z")

</div>

You probably need to submit a manual PR to the General registry changing the adequate path

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [November 22, 2024, 12:05pm UTC](https://discourse.julialang.org/t/adjusting-structure-of-registered-package/122948/3 "2024-11-22T12:05:09Z")

</div>

A more general case is explained in this README section:

> **[GitHub - JuliaRegistries/General: The official registry of general Julia packages](https://github.com/JuliaRegistries/General?tab=readme-ov-file#how-do-i-move-a-subdirectory-package-to-its-own-repository)**
>
> The official registry of general Julia packages

In your case you’re not moving to another repo but within the same repo, so you only need to make a `subdir` removing manual PR. (The part about old releases being available is important but should be trivially fulfilled if all you did was moving files around without doing any history rewriting.)

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [November 22, 2024, 12:15pm UTC](https://discourse.julialang.org/t/adjusting-structure-of-registered-package/122948/5 "2024-11-22T12:15:43Z")

</div>

That won’t help. It wasn’t Registrator that didn’t like the change of subdir but Automerge.

---

<div class="post-metadata">

**Author:** ![Pablo\_Marchant](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pablo_marchant/32/32828_2.png) [@Pablo\_Marchant](https://discourse.julialang.org/u/Pablo_Marchant)\
**Post date:** [November 22, 2024, 12:55pm UTC](https://discourse.julialang.org/t/adjusting-structure-of-registered-package/122948/6 "2024-11-22T12:55:21Z")

</div>

Thanks! From the modified repo I do see that the repo correctly lists the single existing version of the package

```julia
check_packages_versions(["StarStats"], "https://github.com/orlox/StarStats.jl.git")
Cloning into '/tmp/jl_qt8t1F'...
remote: Enumerating objects: 292, done.
remote: Counting objects: 100% (135/135), done.
remote: Compressing objects: 100% (101/101), done.
remote: Total 292 (delta 55), reused 99 (delta 31), pack-reused 157 (from 1)
Receiving objects: 100% (292/292), 28.84 MiB | 8.50 MiB/s, done.
Resolving deltas: 100% (110/110), done.
pkg_names = ["StarStats"]
StarStats: v0.12.0 found
1-element Vector{@NamedTuple{pkg_name::String, version::VersionNumber, found::Bool}}:
 (pkg_name = "StarStats", version = v"0.12.0", found = 1)

```

So the change should be simple.
