Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

General format options? #21

Open
epage opened this issue May 8, 2018 · 1 comment
Open

General format options? #21

epage opened this issue May 8, 2018 · 1 comment
Labels
breaking-change question Further information is requested
Milestone

Comments

@epage
Copy link
Contributor

epage commented May 8, 2018

Currently the format is HashMap<PathBuf, Vec<Source>>

  • Hierarchy is clear
  • More complexity to expand
  • More complexity to merge multiple stages (a default and a user stage)

Other possible options:

  • Vec<PathBuf, Source>
    • Easy to expand
    • Easy to merge
    • But what do we call the PathBuf field in the struct (since we can't actually use a tuple)? We we'd probably flatten the Source struct into this, meaning we can't conflict with any Source names
  • Vec<PathBuf, Vec<Source>>
    • Worse of both worlds?
@epage epage added question Further information is requested breaking-change labels May 8, 2018
@epage
Copy link
Contributor Author

epage commented Aug 11, 2018

Current format is a Map<Path, Vec<Source>

[[stage."/usr/bin"]]
type="SourceFile"
path="./targets/release/foo"

Possible formats

Vec<{destinaton: Path, nested: Source}>

[[stage]]
destination="/usr/bin"
type="SourceFile"
path="./targets/release/foo"

Nested / Recursive which works better in yaml/json than toml

stage:
  - name: usr
    type: Directory
    content:
      - name: bin
        type: Directory
        content:
        - type: SourceFile
          path: "./targets/release/foo"

epage added a commit to epage/stager that referenced this issue Aug 12, 2018
Its a noun, so should be `Stage` and not `Staging`.

For `de`, we are using a `Map` format and could support more (see crate-ci#21).

BREAKING CHANGE: Renamed `Staging`.
epage added a commit to epage/stager that referenced this issue Aug 12, 2018
Its a noun, so should be `Stage` and not `Staging`.

For `de`, we are using a `Map` format and could support more (see crate-ci#21).

BREAKING CHANGE: Renamed `Staging`.
@epage epage added this to the 1.0 milestone Aug 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking-change question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant