diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2019-11-08 18:19:17 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2019-11-29 18:36:42 -0300 |
commit | acf8bcb82ae697a5bac94bfbe93c3ad9d7487795 (patch) | |
tree | 62b7239b8701526d69833d9a64f5757bdee2e1df /spec/doc_spec.lua | |
parent | dfc277954d2fe2586dc491cdc1216bae22399251 (diff) | |
download | luarocks-acf8bcb82ae697a5bac94bfbe93c3ad9d7487795.tar.gz luarocks-acf8bcb82ae697a5bac94bfbe93c3ad9d7487795.tar.bz2 luarocks-acf8bcb82ae697a5bac94bfbe93c3ad9d7487795.zip |
dependency pinning: luarocks.lock file and --pin flag
This adds support for pinning dependencies in projects and rocks:
* Adds a new flag called `--pin` which creates a `luarocks.lock`
when building a rock with `luarocks build` or `luarocks make`.
This lock file contains the exact version numbers of every
direct or indirect dependency of the rock (in other words,
it is the transitive closure of the dependencies.)
For `make`, the `luarocks.lock` file is created in the current
directory.
The lock file is also installed as part of the rock in
its metadata directory alongside its rockspec.
When using `--pin`, if a lock file already exists, it is
ignored and overwritten.
* When building a rock with `luarocks make`, if there is a
`luarocks.lock` file in the current directory, the exact
versions specified there will be used for resolving dependencies.
* When building a rock with `luarocks build`, if there is a
`luarocks.lock` file in root of its sources, the exact
versions specified there will be used for resolving dependencies.
* When installing a `.rock` file with `luarocks install`, if the
rock contains a `luarocks.lock` file (i.e., if its dependencies
were pinned with `--pin` when the rock was built), the exact
versions specified there will be used for resolving dependencies.
Diffstat (limited to 'spec/doc_spec.lua')
-rw-r--r-- | spec/doc_spec.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/doc_spec.lua b/spec/doc_spec.lua index bf5214d4..2c0f4bce 100644 --- a/spec/doc_spec.lua +++ b/spec/doc_spec.lua | |||
@@ -70,7 +70,7 @@ describe("LuaRocks doc tests #integration", function() | |||
70 | describe("#namespaces", function() | 70 | describe("#namespaces", function() |
71 | it("retrieves docs for a namespaced package from the command-line", function() | 71 | it("retrieves docs for a namespaced package from the command-line", function() |
72 | assert(run.luarocks_bool("build a_user/a_rock --server=" .. testing_paths.fixtures_dir .. "/a_repo" )) | 72 | assert(run.luarocks_bool("build a_user/a_rock --server=" .. testing_paths.fixtures_dir .. "/a_repo" )) |
73 | assert(run.luarocks_bool("build a_rock --keep --server=" .. testing_paths.fixtures_dir .. "/a_repo" )) | 73 | assert(run.luarocks_bool("build a_rock 1.0 --keep --server=" .. testing_paths.fixtures_dir .. "/a_repo" )) |
74 | assert.match("a_rock 2.0", run.luarocks("doc a_user/a_rock")) | 74 | assert.match("a_rock 2.0", run.luarocks("doc a_user/a_rock")) |
75 | end) | 75 | end) |
76 | end) | 76 | end) |