Git Product home page Git Product logo

repository's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

repository's Issues

Add package dependencies to the repo

This is required for more complex packages that depend on each other. My proposal is to do the following format change:

{
  "dependencies": {
    "${import name 1}": "${package name 1}",
    "${import name 2}": "${package name 2}"
  }
}

This allows package managers to create a correct DAG out of the packages and build a correct std.build.Pkg structure. Import name is the name that needs to get passed to @import(…), package name is the file name in the repository without the file extension.

Example:

{
  "author": "truemedian",
  "description": "A WebSocket 1.3 library for Zig",
  "git": "https://github.com/truemedian/wz",
  "root_file": "/src/main.zig",
  "dependencies": {
    "hzzp": "hzzp"
  },
  "tags": [
    "networking"
  ]
}

Missing fields

any project listing would need at the very least:

  • link to project page
  • link to documentation
  • option to non-git repositories

Add new package option to indicate whether it has module support

Zig package manager has been merged for a while, as for this project, I suggest we add a new option module: bool to indicate whether it has module support, something like this:

{
  "author": "vrischmann",
  "tags": [
    "database"
  ],
  "git": "https://github.com/vrischmann/zig-sqlite",
  "root_file": "/sqlite.zig",
  "description": "zig-sqlite is a small wrapper around sqlite's C API, making it easier to use with Zig. ",
  "license": "mit",
  "updated_at": "2023-01-28T06:15:38Z",
  "homepage": ""
  "module": false   // newly add field
}

Encode dependencies in the repo data

I'm using a private repository similar to this for my own "package manager" (it's just a way to quickly add submodules). The current format allows these two configurations:

"parser-toolkit": {
  "git": "https://github.com/MasterQ32/parser-toolkit",
  "pkg_file": "src/main.zig"
},
"sdl": {
  "git": "https://github.com/MasterQ32/SDL.zig",
  "sdk_file": "Sdk.zig"
}

The pkg_file item can be set for repositories that export a single zig package (like zig-args), the sdk_file can be used for packages that use a build time package (like SDL.zig).

What's currently not covered is repos that export more than one package (like SDL.zig). What we could do for those is either using a sdk_file or this:

"sdl": {
  "git": "https://github.com/MasterQ32/SDL.zig",
  "sdk_file": "Sdk.zig",
  "packages": {
    "native": "src/binding/sdl.zig",
    "wrapper": "src/wrapper/sdl.zig"
  }
}

This does not cover any dependencies yet, so what i'm experimenting around with is this structure:

"ziglyph": {
  "git": "https://github.com/jecolon/ziglyph",
  "pkg_file": "src/ziglyph.zig"
},
"zigstr": {
  "git": "https://github.com/jecolon/zigstr",
  "pkg_file": "src/Zigstr.zig",
  "dependencies": [
    "ziglyph"
  ]
}

This does not properly encode multi-package-repos yet, neither as a dependency nor as source package. The dependencies field could use a string-formatted variant like "sdl/native" or similar, while multi-package repos could use a { "file": "", "dependencies": [ … ] } structure for the packages items.

Any thoughts?

@mattnite and @nektro already have designed a similar system, so i'd appreciate some input on these thoughts. Am i missing some important data or could this actually be enough to model a zig package structure (excluding any kind of versions)

Suggestion: Add license info to package format?

Might be nice to add a license field to the package json.

Something super simple like:

"license": "MIT",
"license_url": "https://github.com/ziglibs/repository/blob/main/LICENSE"

Where LICENSE is one of predefined text, for instance one of PUBDOMAIN | MIT | BSD-3C | BSD-2C | ISC | APACHE-2.0 | GPL2 | GPL3 | ... | CUSTOM
Where CUSTOM could be a catch all for "not a common one; user should investigate further".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.