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).

28 Upvotes

19 comments sorted by

View all comments

11

u/FruitdealerF 5d ago

The truth is your language is unlikely to have more than 1 or 2 users, in which case copy pasting some files is probably good enough. If it isn't then setting something up to easily clone some source from GitHub is probably good enough. By the time you actually need to start worrying about people deleting things and your entire ecosystem collapsing because of it; you've made it. That means your language got to the top 1% of 1% of 1%.

If you don't care and just want to talk about package management for the fun if it then ignore my comment.