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

Document registries and packaging process #962

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

szymmis
Copy link
Contributor

@szymmis szymmis commented Nov 30, 2023

Resolves #734 and #901.

@szymmis szymmis linked an issue Nov 30, 2023 that may be closed by this pull request

### `VCS.json`

File containing info about version control system used in your package.\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
File containing info about version control system used in your package.\
File containing info about version control system used in your package.

### `VCS.json`

File containing info about version control system used in your package.\
Currently only git is supported.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Currently only git is supported.
Currently only Git is supported.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put each sentence in a separate line. This makes diffs in markdown files significantly better because people mostly operate on sentence level when writing prose, while diff works line-by-line.

@@ -0,0 +1,7 @@
# Overview

Scarb is not only a Cairo build toolchain but also a package manager, so it needs support for package storage. Currently, Git is the default for hosting community packages, but their visibility and ease of discovery are greatly limited. That's what registries are for, to have a concentration of packages in one place that are easily discoverable.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation should focus not on what is changing, but on what is state of the art now. Saying that Git is currently the default is unnecessary. At the very moment of publishing these docs, registries will be the default, while Git be the past.

It's a different thing that there is no official registry, but this is a temporary caveat, which should be said as a banner or something in my opinion.


Although the official Cairo package registry is in active development and not ready for use yet, you can [host your own](/docs/registries/custom-registry) registry or search for and [use](/docs/registries/custom-registry#using-custom-registry) a community-hosted one.

If you are interested in learning about the packaging and publishing process, you can read about it [here](/docs/registries/packaging).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use internal links. Editors will try to maintain these when moving files etc.

Use `scarb package` command to create an archive of your package. You can read about package compression algorithm and contents in [Package tarball](/docs/registries/package-tarball) section.
Basically when you run the command Scarb looks for the source code of your package together with metadata files such as manifest file and put them in an archive in `target/package` directory.

If you are in a git repository, Scarb will first check if the repo state is clean and error out in case of any changes present in a git working directory. To ignore this check you can use the `--allow-dirty` flag.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you are in a git repository, Scarb will first check if the repo state is clean and error out in case of any changes present in a git working directory. To ignore this check you can use the `--allow-dirty` flag.
If you are in a Git repository, Scarb will first check if the repo state is clean and error out in case of any changes present in a git working directory. To ignore this check you can use the `--allow-dirty` flag.


If you are in a git repository, Scarb will first check if the repo state is clean and error out in case of any changes present in a git working directory. To ignore this check you can use the `--allow-dirty` flag.

Next step is the package verification. After creating an initial archive, Scarb will attempt to unpack it and compile to check for any corruptions in the packaging process. If you want to speed up the package process you can disable this step using the `--no-verify` flag.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider emphasizing that this is a dangerous operation because you never know

@mkaput
Copy link
Member

mkaput commented Jan 16, 2024

We will probably want to merge this after the registry MVP is released

@mkaput mkaput requested a review from DelevoXDG April 3, 2024 11:58
@mkaput mkaput removed the request for review from DelevoXDG April 3, 2024 11:58
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

Successfully merging this pull request may close these issues.

Document registries Document packaging infrastructure
3 participants