eeue56 / derw

An Elm-inspired language that transpiles to TypeScript
BSD 3-Clause "New" or "Revised" License
378 stars 9 forks source link

Package hosting options #3

Open toastal opened 2 years ago

toastal commented 2 years ago

https://github.com/eeue56/derw/blob/6f94fd8d2ed0bd8796b797dac2b14b09334d623b/src/cli/install.ts#L157-L171 (also, are you sure you don't want console.error instead of log here?)

Before this project digs itself into the same hole Elm did, please do not require that all packages come from Microsoft-owned GitHub. There are several valid reasons this is problematic from requiring agrees to GitHub's ToS to even begin participating in the community, to supporting FOSS platforms, avoiding vendor lock-in, promoting diversity, freedom+self-hosting, etc.

Suggestions:

  1. require the full git: URL regardless of where the Git forge is hosted
  2. above, but provide prefix shorthands for common ones like Nixpkgs fetch*; which includes but not limited to GitHub, GitLab, Gitea, Sourcehut, Bitbucket, Savannah (e.g. sourcehut:toastal/derw-lib) (missing Codeberg though (but Codeberg is Gitea)). This allows self-hosting while adding convenience -- and once the tarball situation is figured out (I believe the latest blog entry is wrong about GitHub lacking tarballs (see fetchGitHub)) all of these platform, including cgit support tarballs via git archive which can be used along the same shorthand switch/case.

Not acceptable:

  1. Only GitHub
  2. Giving GitHub special-er treament than say GitLab (e.g. no to toastal/derw-lib assuming GitHub since it's neither a full Git URL nor contains a shorthand as mentioned above in Suggestion#2, and more pedantically users must always use github:toastal/derw-lib). GitHub does not need additional promotion or implicit endorsement.

Possible longer-term but likely way out of scope for contemporary version control:

  1. Go beyond Git. SVN still exists as does Mercurial, Pijul, darcs, etc.