-
-
Notifications
You must be signed in to change notification settings - Fork 61
2020 Metadata format migration
Metadata storage has been simplified with the objective of making some processes simpler and provide better workflows for users of Alire.
A rationale for the changes can be found at https://github.com/alire-project/alire/blob/1bc699922d1fa83e64d5cd36f2870a9ed7fd6a25/doc/AEPs/aep-0002.md
In short, now you are expected to keep the manifest file (alire.toml) and companion lock file (alire.lock) at the root of your project under version control. The manifest is to be updated as needed to reflect your project needs (dependencies, project files, etc.) and will need only minimal modifications for publishing (adding the origin table describing how to obtain the sources).
- The
./alire/crate_name.tomlfile is moved to./alire.toml(always namedalire.toml). - The contents of the file, described in https://github.com/alire-project/alire/blob/master/doc/catalog-format-spec.md, suffer the following main changes:
- The
[general]and[x.x.x]tables are merged and its contents moved to the top-level table of the file (no[ ]nested table). - The
originrelated fields cannot longer appear in a workspace manifest. - The
originrelated fields are now under an[origin]table in the index manifest. - New
nameandversionfields are mandatory at the top level. Its type isstringand its contents the crate name and semantic version, respectively. - Dependencies are no longer inside a table, but inside one or more
[[depends-on]]array entries.
- The
- The
./alire/configfile is renamed to./alire/config.toml
If your project is simple you may find easier to just reinitialize the workspace and re-fill your information in the new manifest. Otherwise, follow these steps:
- Move and rename
./alire/<crate_name>.tomlto./alire.toml - Edit
./alire.toml:- Add a
name = "<crate name>"field at the top (using your actual crate name). - Add a
version = "x.x.x"field at the top (use an actual numeric version). - Replace any
[depends-on]table with a[[depends-on]]array of tables entry. - Remove the
[general]line. - Remove any
['x.x.x']line (your file will contain an actual version, possibly0.0.0). - Remove any
generaland'x.x.x'prefixes from the rest of fields/tables, if any. - Remove any origin-related fields (
origin,origin-hashes,archive-name).
- Add a
- If
./alire/configexists, rename it as./alire/config.toml