diff options
-rw-r--r-- | .travis.yml | 4 | ||||
-rw-r--r-- | src/luarocks/cfg.lua | 1 | ||||
-rw-r--r-- | src/luarocks/command_line.lua | 6 | ||||
-rw-r--r-- | src/luarocks/type_check.lua | 3 | ||||
-rw-r--r-- | src/luarocks/util.lua | 1 | ||||
-rw-r--r-- | test/testfiles/no_build_table-0.1-1.rockspec | 12 | ||||
-rw-r--r-- | test/testing.lua | 1 | ||||
-rwxr-xr-x | test/testing.sh | 1 |
8 files changed, 18 insertions, 11 deletions
diff --git a/.travis.yml b/.travis.yml index db762a84..69ec28f3 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -7,7 +7,7 @@ sudo: false | |||
7 | env: | 7 | env: |
8 | matrix: | 8 | matrix: |
9 | - LUA_VER=5.1.5 | 9 | - LUA_VER=5.1.5 |
10 | - LUA_VER=5.2.3 | 10 | - LUA_VER=5.2.4 |
11 | - LUA_VER=5.3.0 | 11 | - LUA_VER=5.3.1 |
12 | 12 | ||
13 | script: cd test && ./testing.sh --travis --lua $LUA_VER | 13 | script: cd test && ./testing.sh --travis --lua $LUA_VER |
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua index b9a7b31a..2a92c4dd 100644 --- a/src/luarocks/cfg.lua +++ b/src/luarocks/cfg.lua | |||
@@ -220,7 +220,6 @@ end | |||
220 | local defaults = { | 220 | local defaults = { |
221 | 221 | ||
222 | local_by_default = false, | 222 | local_by_default = false, |
223 | use_extensions = false, | ||
224 | accept_unknown_fields = false, | 223 | accept_unknown_fields = false, |
225 | fs_use_modules = true, | 224 | fs_use_modules = true, |
226 | hooks_enabled = true, | 225 | hooks_enabled = true, |
diff --git a/src/luarocks/command_line.lua b/src/luarocks/command_line.lua index 495fe855..dbf64b9c 100644 --- a/src/luarocks/command_line.lua +++ b/src/luarocks/command_line.lua | |||
@@ -113,12 +113,6 @@ function command_line.run_command(...) | |||
113 | end | 113 | end |
114 | end | 114 | end |
115 | command = command:gsub("-", "_") | 115 | command = command:gsub("-", "_") |
116 | |||
117 | if flags["extensions"] then | ||
118 | cfg.use_extensions = true | ||
119 | local type_check = require("luarocks.type_check") | ||
120 | type_check.load_extensions() | ||
121 | end | ||
122 | 116 | ||
123 | if cfg.local_by_default then | 117 | if cfg.local_by_default then |
124 | flags["local"] = true | 118 | flags["local"] = true |
diff --git a/src/luarocks/type_check.lua b/src/luarocks/type_check.lua index 5e3bfb0d..65b4fc15 100644 --- a/src/luarocks/type_check.lua +++ b/src/luarocks/type_check.lua | |||
@@ -87,7 +87,8 @@ local rockspec_types = { | |||
87 | copy_directories = { | 87 | copy_directories = { |
88 | _any = string_1, | 88 | _any = string_1, |
89 | }, | 89 | }, |
90 | _more = true | 90 | _more = true, |
91 | _mandatory = true | ||
91 | }, | 92 | }, |
92 | hooks = { | 93 | hooks = { |
93 | platforms = {}, -- recursively defined below | 94 | platforms = {}, -- recursively defined below |
diff --git a/src/luarocks/util.lua b/src/luarocks/util.lua index 6a99b568..6fecf863 100644 --- a/src/luarocks/util.lua +++ b/src/luarocks/util.lua | |||
@@ -81,7 +81,6 @@ local supported_flags = { | |||
81 | ["deps"] = true, | 81 | ["deps"] = true, |
82 | ["deps-mode"] = "<mode>", | 82 | ["deps-mode"] = "<mode>", |
83 | ["detailed"] = "\"<text>\"", | 83 | ["detailed"] = "\"<text>\"", |
84 | ["extensions"] = true, | ||
85 | ["force"] = true, | 84 | ["force"] = true, |
86 | ["from"] = "<server>", | 85 | ["from"] = "<server>", |
87 | ["help"] = true, | 86 | ["help"] = true, |
diff --git a/test/testfiles/no_build_table-0.1-1.rockspec b/test/testfiles/no_build_table-0.1-1.rockspec new file mode 100644 index 00000000..5d79e9a0 --- /dev/null +++ b/test/testfiles/no_build_table-0.1-1.rockspec | |||
@@ -0,0 +1,12 @@ | |||
1 | package = "no_build_table" | ||
2 | version = "0.1-1" | ||
3 | source = { | ||
4 | -- any valid URL | ||
5 | url = "https://raw.github.com/keplerproject/luarocks/master/src/luarocks/build.lua" | ||
6 | } | ||
7 | description = { | ||
8 | summary = "A rockspec with no build field", | ||
9 | } | ||
10 | dependencies = { | ||
11 | "lua >= 5.1" | ||
12 | } | ||
diff --git a/test/testing.lua b/test/testing.lua index 86f3ab34..44c6f098 100644 --- a/test/testing.lua +++ b/test/testing.lua | |||
@@ -203,6 +203,7 @@ local tests = { | |||
203 | fail_lint_type_mismatch_string = function() return run '$luarocks lint "$testing_dir/testfiles/type_mismatch_string-1.0-1.rockspec"' end, | 203 | fail_lint_type_mismatch_string = function() return run '$luarocks lint "$testing_dir/testfiles/type_mismatch_string-1.0-1.rockspec"' end, |
204 | fail_lint_type_mismatch_version = function() return run '$luarocks lint "$testing_dir/testfiles/type_mismatch_version-1.0-1.rockspec"' end, | 204 | fail_lint_type_mismatch_version = function() return run '$luarocks lint "$testing_dir/testfiles/type_mismatch_version-1.0-1.rockspec"' end, |
205 | fail_lint_type_mismatch_table = function() return run '$luarocks lint "$testing_dir/testfiles/type_mismatch_table-1.0-1.rockspec"' end, | 205 | fail_lint_type_mismatch_table = function() return run '$luarocks lint "$testing_dir/testfiles/type_mismatch_table-1.0-1.rockspec"' end, |
206 | fail_lint_no_build_table = function() return run '$luarocks lint "$testing_dir/testfiles/no_build_table-0.1-1.rockspec"' end, | ||
206 | test_list = function() return run "$luarocks list" end, | 207 | test_list = function() return run "$luarocks list" end, |
207 | test_list_porcelain = function() return run "$luarocks list --porcelain" end, | 208 | test_list_porcelain = function() return run "$luarocks list --porcelain" end, |
208 | test_make_with_rockspec = function() | 209 | test_make_with_rockspec = function() |
diff --git a/test/testing.sh b/test/testing.sh index 8d972d4c..4338e48f 100755 --- a/test/testing.sh +++ b/test/testing.sh | |||
@@ -419,6 +419,7 @@ test_lint_ok() { $luarocks download --rockspec validate-args ${verrev_validate_a | |||
419 | fail_lint_type_mismatch_string() { $luarocks lint "$testing_dir/testfiles/type_mismatch_string-1.0-1.rockspec"; } | 419 | fail_lint_type_mismatch_string() { $luarocks lint "$testing_dir/testfiles/type_mismatch_string-1.0-1.rockspec"; } |
420 | fail_lint_type_mismatch_version() { $luarocks lint "$testing_dir/testfiles/type_mismatch_version-1.0-1.rockspec"; } | 420 | fail_lint_type_mismatch_version() { $luarocks lint "$testing_dir/testfiles/type_mismatch_version-1.0-1.rockspec"; } |
421 | fail_lint_type_mismatch_table() { $luarocks lint "$testing_dir/testfiles/type_mismatch_table-1.0-1.rockspec"; } | 421 | fail_lint_type_mismatch_table() { $luarocks lint "$testing_dir/testfiles/type_mismatch_table-1.0-1.rockspec"; } |
422 | fail_lint_no_build_table() { $luarocks lint "$testing_dir/testfiles/no_build_table-0.1-1.rockspec"; } | ||
422 | 423 | ||
423 | test_list() { $luarocks list; } | 424 | test_list() { $luarocks list; } |
424 | test_list_porcelain() { $luarocks list --porcelain; } | 425 | test_list_porcelain() { $luarocks list --porcelain; } |