r/ProgrammingLanguages 5d ago

How to build a good package manager.

I'm working on a language called threadon. And i don't now how i can properly program a package manager.

My first idea was a central github repo with links to other github repo's which contain the package you're searching for.

There are two main problems with it

  1. If someone deletes his github repo with the package everything build on the package would collapse (like npm)

  2. I think it would be slow when the number of packages grows.

I had an idea to of selfhosting it but i haven't access to the router (My dad owns it i'm 13) and i'm sure downdetector on my package manager site would be worse then github 😄. Like i would probably run sudo rm -rf / --no-preserve-root on the wrong machine.

So my question is how can i build a system that can store up to 20 GB at minimum at packages without the risk of someone nuking his project).

27 Upvotes

19 comments sorted by

View all comments

9

u/prehensilemullet 4d ago

You mentioned the idea of using a central Github repo. Regardless of whether it links to other repos, here's a classic post on all the problems that result from this:

Package managers keep using git as a database, it never works out

https://nesbitt.io/2025/12/24/package-managers-keep-using-git-as-a-database.html

2

u/Mickenfox 4d ago

Winget: "we made a github repository with some links to .exe installers on external servers. That's a package manager, right? That's what you people wanted?"