nitrogen
nitrogen copied to clipboard
Packaging distribution/download/management
How to do packaging? Right now if a package is needed for an application, the file(s) must be manually downloaded and added to the source tree. They can be placed under a vendor folder of some kind since the search path can be modified.
Start off with a proof of concept. Something like package.json or elm.json. Author information and list of dependencies.
Central repository? Most other languages do that. Maybe later, start by just downloading from an upstream repo via http.
Version resolution, minimum versions like Go modules or "normal" resolution like most languages? Would need to be able to parse semantic versioning constraints and write a dependency resolver.
How are packages structured? Everything under a src
directory? Is the repo root the root of the package?
Stage 1: Package database managed in Git. The repo only contains metadata for packages including where to download the source files.
Stage 2: Package database managed by an HTTP server with accounts. The package manager wouldn't need to deal with git repos anymore, only HTTP endpoints.
Git Repo Structure
root |-periodic.json (Package database metadata file) |-pkgs (Package data lives here) |-a (Packages are sorted by initial letter) |-b |-c |-chrono (Package name) |-periodic.json (Package metadata) |-1.0.0 (Version specific overrides, if any) |-periodic.json
Package Versions
Package versions will use git tags by default with the format vX.Y.Z
. All other tags will be ignored. Packages not managed in git can use version override files to specify the download location for a specific version of the package.
Work started here: https://github.com/nitrogen-lang/noble