diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-04-05 15:50:45 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-04-11 14:38:06 -0300 |
commit | 835d21e98e95e0ed2b6b028ddb06fe87427e5488 (patch) | |
tree | 1873e77e938a013b60ef106e1fa063f41ce159c2 /spec/fixtures | |
parent | 660f088cf936dcaa65a1c7eb2793df78777ad924 (diff) | |
download | luarocks-835d21e98e95e0ed2b6b028ddb06fe87427e5488.tar.gz luarocks-835d21e98e95e0ed2b6b028ddb06fe87427e5488.tar.bz2 luarocks-835d21e98e95e0ed2b6b028ddb06fe87427e5488.zip |
Add support for namespaces.
For details of the new feature, see
https://github.com/luarocks/luarocks/wiki/Namespaces
This ended up being a huge commit because of some major refactoring
motivated by the new feature:
* new modules for some object types:
* `luarocks.queries` - all functions that look for rocks in local or
remote repositories now use objects constructed by this module:
query objects contain the name, namespace and query constraints.
Dependencies in a rockspec are also stored as query objects.
* `luarocks.results` - all individual results produces from queries
are returned in this format: result objects contain the name,
namespace, version, arch and repo.
* the `results` object was renamed to `result_tree`, to better
reflect that it is not an array of `result` objects.
* `luarocks.vers` was removed, its functionality was moved to better locations.
Specifically on namespaces:
* Commands that take a rock `name` can now take `namespace/name`
(and alternately `--flags=namespace` so that URLs can be
also installed with a nominal namespace).
* Rocks installed from a namespace now create a `rock_namespace`
file alongside `rock_manifest`, which is used when matching
namespaced dependencies against locally-installed rocks.
* Using namespaced dependencies in a rockspec, requires
`rockspec_format = "3.0"`.
* Tests under the `#namespaces` hashtag, all using a local repository.
Diffstat (limited to 'spec/fixtures')
-rw-r--r-- | spec/fixtures/a_repo/manifest | 20 | ||||
-rw-r--r-- | spec/fixtures/a_repo/manifest-5.1 | 20 | ||||
-rw-r--r-- | spec/fixtures/a_repo/manifest-5.2 | 20 | ||||
-rw-r--r-- | spec/fixtures/a_repo/manifest-5.3 | 20 |
4 files changed, 80 insertions, 0 deletions
diff --git a/spec/fixtures/a_repo/manifest b/spec/fixtures/a_repo/manifest index ea198207..141dafb5 100644 --- a/spec/fixtures/a_repo/manifest +++ b/spec/fixtures/a_repo/manifest | |||
@@ -10,5 +10,25 @@ repository = { | |||
10 | arch = "rockspec" | 10 | arch = "rockspec" |
11 | } | 11 | } |
12 | } | 12 | } |
13 | }, | ||
14 | has_another_namespaced_dep = { | ||
15 | ["1.0-1"] = { | ||
16 | { | ||
17 | arch = "rockspec" | ||
18 | }, | ||
19 | { | ||
20 | arch = "src" | ||
21 | } | ||
22 | } | ||
23 | }, | ||
24 | has_namespaced_dep = { | ||
25 | ["1.0-1"] = { | ||
26 | { | ||
27 | arch = "rockspec" | ||
28 | }, | ||
29 | { | ||
30 | arch = "src" | ||
31 | } | ||
32 | } | ||
13 | } | 33 | } |
14 | } | 34 | } |
diff --git a/spec/fixtures/a_repo/manifest-5.1 b/spec/fixtures/a_repo/manifest-5.1 index ea198207..141dafb5 100644 --- a/spec/fixtures/a_repo/manifest-5.1 +++ b/spec/fixtures/a_repo/manifest-5.1 | |||
@@ -10,5 +10,25 @@ repository = { | |||
10 | arch = "rockspec" | 10 | arch = "rockspec" |
11 | } | 11 | } |
12 | } | 12 | } |
13 | }, | ||
14 | has_another_namespaced_dep = { | ||
15 | ["1.0-1"] = { | ||
16 | { | ||
17 | arch = "rockspec" | ||
18 | }, | ||
19 | { | ||
20 | arch = "src" | ||
21 | } | ||
22 | } | ||
23 | }, | ||
24 | has_namespaced_dep = { | ||
25 | ["1.0-1"] = { | ||
26 | { | ||
27 | arch = "rockspec" | ||
28 | }, | ||
29 | { | ||
30 | arch = "src" | ||
31 | } | ||
32 | } | ||
13 | } | 33 | } |
14 | } | 34 | } |
diff --git a/spec/fixtures/a_repo/manifest-5.2 b/spec/fixtures/a_repo/manifest-5.2 index ea198207..141dafb5 100644 --- a/spec/fixtures/a_repo/manifest-5.2 +++ b/spec/fixtures/a_repo/manifest-5.2 | |||
@@ -10,5 +10,25 @@ repository = { | |||
10 | arch = "rockspec" | 10 | arch = "rockspec" |
11 | } | 11 | } |
12 | } | 12 | } |
13 | }, | ||
14 | has_another_namespaced_dep = { | ||
15 | ["1.0-1"] = { | ||
16 | { | ||
17 | arch = "rockspec" | ||
18 | }, | ||
19 | { | ||
20 | arch = "src" | ||
21 | } | ||
22 | } | ||
23 | }, | ||
24 | has_namespaced_dep = { | ||
25 | ["1.0-1"] = { | ||
26 | { | ||
27 | arch = "rockspec" | ||
28 | }, | ||
29 | { | ||
30 | arch = "src" | ||
31 | } | ||
32 | } | ||
13 | } | 33 | } |
14 | } | 34 | } |
diff --git a/spec/fixtures/a_repo/manifest-5.3 b/spec/fixtures/a_repo/manifest-5.3 index ea198207..141dafb5 100644 --- a/spec/fixtures/a_repo/manifest-5.3 +++ b/spec/fixtures/a_repo/manifest-5.3 | |||
@@ -10,5 +10,25 @@ repository = { | |||
10 | arch = "rockspec" | 10 | arch = "rockspec" |
11 | } | 11 | } |
12 | } | 12 | } |
13 | }, | ||
14 | has_another_namespaced_dep = { | ||
15 | ["1.0-1"] = { | ||
16 | { | ||
17 | arch = "rockspec" | ||
18 | }, | ||
19 | { | ||
20 | arch = "src" | ||
21 | } | ||
22 | } | ||
23 | }, | ||
24 | has_namespaced_dep = { | ||
25 | ["1.0-1"] = { | ||
26 | { | ||
27 | arch = "rockspec" | ||
28 | }, | ||
29 | { | ||
30 | arch = "src" | ||
31 | } | ||
32 | } | ||
13 | } | 33 | } |
14 | } | 34 | } |