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

依存パッケージを各プロジェクトで保有できるようにする #32

Open
Cj-bc opened this issue Nov 23, 2019 · 2 comments

Comments

@Cj-bc
Copy link
Owner

Cj-bc commented Nov 23, 2019

現状の問題点

  • グローバルに一つのバージョンしか置けない
  • バージョン管理ができない

解決策

package.yamlのような物を配置する

@Cj-bc
Copy link
Owner Author

Cj-bc commented Nov 23, 2019

一番簡単な方法

CSVで管理する

cj-bc/libblib, 0.3
niieani/bash-oo-framework, 2.0

利点

パースが楽、シンプル

欠点

「ライブラリの依存ライブラリ」の管理方法にならない

@Cj-bc
Copy link
Owner Author

Cj-bc commented Nov 23, 2019

yamlで管理してPackage型にするのはどうか

name: libblib
description: core of bash package manager 'blib'
dependencies:
  - name: cj-bc/libtar
    version: 0.3
  - name: https://github.com/niieani/bash-oo-framework
    version: 2.0
class:Package() {
  public string name = ""
  array version = ()
  map dependencies

  Package::fromYaml() {
    [string] path
    Yaml yml = $(Yaml::fromFile path)
    Package pkg
    $var:pkg name = "$(Data.Yaml.FindKey 

  }
}


Package pkg=$(Package::loadYaml "package.yaml")

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