diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-12-07 16:32:48 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-12-07 16:54:26 +0100 |
commit | 8767afa0638edc4d3a8995dc96ebfeb6703fc6a5 (patch) | |
tree | 033be4ef1353bfeb8bbf0a4b4cb8f3a26925405f /examples | |
parent | 6d5b427fda5a74a7c0302e892a23b5229fc18dea (diff) |
Make sources named
This patch changes the sources to be named.
This is required for nice interpolation when layering pkg.toml files.
Before this, we had to make sure that the `[[sources]]` array element
was on the right position.
For example, consider two files:
/pkg.toml
/package/pkg.toml
in the first:
[[sources]]
url = "some/thing"
in the second:
[[sources]
hash.type = "sha1"
hash.value = "asdf..."
When merged:
[[sources]
url = "some/thing"
hash.type = "sha1"
hash.value = "asdf..."
but because the _position_ was responsible for merging these elements,
adding a new source file _before_ the existing on in /pkg.toml would
yield the /package/pkg.toml incomplete when merged onto /pkg.toml, thus
resulting in an error.
With named source entries, this is less likely.
The source file name includes the source name as well, of course.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/packages/example_3/pkg.toml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/packages/example_3/pkg.toml b/examples/packages/example_3/pkg.toml index 1e3cda8..42ad00c 100644 --- a/examples/packages/example_3/pkg.toml +++ b/examples/packages/example_3/pkg.toml @@ -4,7 +4,7 @@ version_is_semver = false # no patches by default patches = [] -[[sources]] +[sources.src] url = "https://github.com/user/repo/archive/sources.tar.gz" hash.type = "sha1" hash.hash = "5e8bcaa3c758f84f01935a914e2bbf01309462ae" |