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

Utilize gno get Command and Create Gno Package Center #60

Open
notJoon opened this issue Mar 19, 2024 · 0 comments
Open

Utilize gno get Command and Create Gno Package Center #60

notJoon opened this issue Mar 19, 2024 · 0 comments

Comments

@notJoon
Copy link
Member

notJoon commented Mar 19, 2024

In our current project (like gnoswap), when a package is needed, we handle it by directly implementing it in the p/demo directory of the forked Gno repository. This approach requires uploading all packages to the repository, resulting in a significant increase in the size of the repository. Additionally, it has been problematic having to run make install every time we use each repository.

To solve these issues, I propose introducing a gno get command, similar to the package management approach of the Go language. By inputting the address of the package (for example: github.com/xxx/xxx), it automatically adds and manages the dependencies. The specific method is as follows:

  1. Once the package information is recognized, update the gno.mod file to determine the correct version of the package and record a checksum to ensure its integrity (we consider creating a separate file like go.sum or Rust's Cargo.lock that stores only the checksum). At this stage, the package is not downloaded, only recorded.

  2. When building or testing the project, the gno.mod file is checked to identify the necessary dependencies. Packages are downloaded and compiled only if necessary. The downloaded packages are stored in Gno's module cache and can be placed in an arbitrary directory such as $GNOPATH/pkg/mod.

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

1 participant