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

Develop the package system #369

Open
wants to merge 311 commits into
base: dev-0-1-0
Choose a base branch
from
Open

Develop the package system #369

wants to merge 311 commits into from

Conversation

gfngfn
Copy link
Owner

@gfngfn gfngfn commented Oct 23, 2022

Contents

Includes:

Memos about design (in Japanese):

TODO:

  • Allow local or git dependencies for satysfi.yaml
    • Local: regard another directory as another package root
    • Git: specify a fixed codebase by a repository and a tag

In essence

You can write dependencies

  • at the top of your document as follows:

    #[config (|
      registries = [
        (|
          name = `default`,
          remote = Git(| url = `https://github.com/SATySFi/default-registry`, branch = `format-1` |),
        |),
      ],
      dependencies = [
        (| name = `std-ja-report`, registry = `default`, requirement = `^0.0.1` |),
        (| name = `math`, registry = `default`, requirement = `^0.0.1` |),
      ],
    |)]
    

    or

  • at the dependencies: section of satysfi.yaml in your package:

    registries:
      - name: "default"
        remote:
          type: "git"
          url: "https://github.com/SATySFi/default-registry"
          branch: "format-1"
    contents:
      type: "library"
      dependencies:
        - name: "std-ja-report"
          registry: "default"
          requirement: "^0.0.1"
        - name: "math"
          registry: "default"
          requirement: "^0.0.1"

Then you can invoke the following command to make the lock file:

  • For documents (this will create or update path/to/your-document.satysfi-lock):

    $ satysfi solve path/to/your-document.saty
  • For packages (this will create or update dir/of/your-package/package.satysfi-lock):

    $ satysfi solve dir/of/your-package/

and then you can typeset documents or checking packages by using the lock file:

  • For documents:

    $ satysfi build path/to/your-document.saty
  • For packages:

    $ satysfi build dir/of/your-package/

@gfngfn gfngfn changed the base branch from master to dev-0-1-0 October 23, 2022 13:54
@gfngfn gfngfn changed the title [WIP] Develop the package system Develop the package system Nov 4, 2022
@gfngfn gfngfn added this to the v0.1.0 milestone May 25, 2023
@gfngfn gfngfn mentioned this pull request Apr 7, 2024
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.

None yet

2 participants