Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make a package manager #154

Open
patricus3 opened this issue Jan 15, 2025 · 4 comments
Open

make a package manager #154

patricus3 opened this issue Jan 15, 2025 · 4 comments

Comments

@patricus3
Copy link

hello all
hunting nvgt project over at github or the forum is tiresome and we should have a central hub for us to download libraries
if more developers will adopt NVGT we should have a package manager since all programming languages have one

@harrymkt
Copy link
Contributor

Seems like this is a good one too. I could make one in Python very quick, but lets hope for more interests.

Maybe in the first faze of package managing we can use simple Python code where we monitor all the packages in a GitHub repository and developers can submit libraries by following a few simple steps that would be written in package management guidelines.

Not much though, it would only require them to add what it calls project metadata like project's name, version, and so on. Developer must provide a direct download link to that library followed by its version release, for example they could tag a GitHub release in their own repository for that project, and then simply linking its version release to download URL metadata.

Once the information is provided we can index them in the main NVGT packages repository, for example index.toml, and developers can create pull requests with the changes they've made. The writing format of index.toml as well as what variables can they use should be provided in the main NVGT packages repository's readme section.

When all above steps are met, users can start using those added libraries.

nvgtpkg install test

And in their main script,

#include "test/main.nvgt"

Any suggestion?

@harrymkt
Copy link
Contributor

harrymkt commented Feb 1, 2025

Try this, I've made with Python.

https://github.com/harrymkt/nvgtpkg

@ethindp
Copy link
Collaborator

ethindp commented Feb 12, 2025

I'm not entirely sure how this would work or even if it would be a good idea. It raises many questions that would need to be discussed quite a lot before anything could be done. Like, a lot of questions. To start, who would even run it? Where would it be hosted, and how would it work? Who would moderate it, protect it from the NPM problem, and prevent malicious packages from being uploaded to it? What even constitutes a "package" in this instance (i.e., is an include a package, or is it a set of includes, or even a project following a specific format/structure)?

@harrymkt
Copy link
Contributor

@ethindp

  1. Who would run it?

    I think we can run on just GitHub platform as the repository is already there. On Windows we could just add the nvgtpkg.exe into the NVGT installation directory, and as long as the NVGT directory is added in the path environment variable, we can just use nvgtpkg <command>.

  2. How it works?

    It works by indexing the packages submitted. For example, assets/pkgs directory has all the package TOML files for each package. Developers don't need to submit their hole folder, only just the package TOML file which contains a direct downloadable links.

  3. Who would moderate it, and prevent malicious packages from being uploaded?

    Well, by everyone. Everyone would submit issues whenever they get a package causing problem, or in the future we can use the NVGT GitHub Action to test package builds.

  4. Project's structure.

    A project consists of a main.nvgt for the package's main file, from which users will include #include "package_name/main.nvgt". Next, we have package.toml file for project metadata like name, direct download link, author information and so on.

    A project may be developed with just main.nvgt, or many includes as they want. In short, main.nvgt is the required file, and you can add other small scripts for include purposes.

    For example, lets say you want to build a helpful includes pack. Instead of using one large file, you could use like the main.nvgt for the main file, math.nvgt, utilities.nvgt, and in the main.nvgt file you can include like #include "math.nvgt".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants