diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-07-02 21:48:53 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-07-02 21:48:53 -0300 |
commit | 9d80a5a11e49726a62e7642bce364e8c2636ad40 (patch) | |
tree | 9c1fb2245c6553c8765bd05b93d1b027c6abc33b | |
parent | 8dd1e1460282f5fc992d838ec2411f4d1bc7b2b7 (diff) | |
download | luarocks-9d80a5a11e49726a62e7642bce364e8c2636ad40.tar.gz luarocks-9d80a5a11e49726a62e7642bce364e8c2636ad40.tar.bz2 luarocks-9d80a5a11e49726a62e7642bce364e8c2636ad40.zip |
Docs: updated Changelog for LuaRocks 3.0
-rw-r--r-- | CHANGELOG.md | 203 |
1 files changed, 151 insertions, 52 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 798f3c5f..d4a49836 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md | |||
@@ -1,56 +1,33 @@ | |||
1 | 1 | ||
2 | What's new in LuaRocks 3.0 | 2 | ## What's new in LuaRocks 3.0 |
3 | ========================== | ||
4 | 3 | ||
5 | * *Breaking change:* The support for deprecated unversioned paths | 4 | - [New rockspec format](#new-rockspec-format) |
6 | (e.g. `/usr/local/lib/luarocks/rocks/` and `/etc/luarocks/config.lua`) | 5 | - [New commands](#new-commands), including [luarocks init](https://github.com/luarocks/luarocks/wiki/Project:-LuaRocks-per-project-workflow) for per-project workflows |
7 | was removed, LuaRocks will now only create and use paths versioned | 6 | - [New flags](#new-flags), including `--lua-dir` and `--lua-version` for using multiple Lua installs with a single LuaRocks |
8 | to the specific Lua version in use | 7 | - [New build system](#new-build-system) |
9 | (e.g. `/usr/local/lib/luarocks/rocks-5.3/` and `/etc/luarocks/config-5.3.lua`). | 8 | - [General improvements](#general-improvements), including [namespaces](https://github.com/luarocks/luarocks/wiki/Namespaces) |
10 | * *New rockspec format:* if you add `rockspec_format = "3.0"` to your | 9 | - [User-visible changes](#user-visible-changes), including some *breaking changes* |
11 | rockspec, you can use all features listed in the section "[Rockspec 3.0]" below. | 10 | - [Internal changes](#internal-changes) |
12 | Note that these rockspecs will only work with LuaRocks 3.0 and above, but | ||
13 | older versions will detect that directive and fail gracefully, giving the | ||
14 | user a message telling them to upgrade. | ||
15 | * *New feature:* [namespaces](https://github.com/luarocks/luarocks/wiki/Namespaces): | ||
16 | you can use `luarocks install user/package` to install a package from a | ||
17 | specific user of the repository. | ||
18 | * *New command:* `luarocks test`. It runs a rock's test suite, as specified | ||
19 | in the new `test` section of the rockspec file. It also does some | ||
20 | autodetection, so it already works with many existing rocks as well. | ||
21 | * *New command:* `luarocks which`. Given the name of an installed, it tells | ||
22 | you which rock it is a part of. For example, `luarocks which lfs` | ||
23 | will tell you it is a part of `luafilesystem` (and give the full | ||
24 | path name to the module). In this sense, `luarocks which` is the | ||
25 | dual command to `luarocks show`. | ||
26 | * *New flag* `--temp-key` for `luarocks upload`, allowing you to easily | ||
27 | upload rocks into an alternate account without disrupting the | ||
28 | stored configuration of your main account. | ||
29 | * *New flag* `--dev`, for enabling development-branch sub-repositories. | ||
30 | This adds support for easily requesting `dev` modules from LuaRocks.org, as in: | ||
31 | `luarocks install --dev luafilesystem`. The list of URLs configured | ||
32 | in `rocks_servers` is prepended with a list containing "/dev" in their paths. | ||
33 | * `luarocks path` now exports versioned variables `LUA_PATH_5_x` and | ||
34 | `LUA_CPATH_5_x` instead of `LUA_PATH` and `LUA_CPATH` | ||
35 | when those are in use in your system. | ||
36 | * Package paths are sanitized to only reference the current Lua version. | ||
37 | For example, if you have `/some/dir/lua/5.1/` in your `$LUA_PATH` and | ||
38 | you are running Lua 5.2, `luarocks.loader` and the `luarocks` command-line | ||
39 | tool will convert it to `/some/dir/lua/5.2/`. | ||
40 | * Wrappers installed using `--tree` now prepend the tree's prefix to their | ||
41 | package paths. | ||
42 | * `luarocks-admin` commands no longer creates an `index.html` file in the | ||
43 | repository by default (it does update it if it alroady exists) | ||
44 | * `luarocks-admin add` now works with `file://` repositories | ||
45 | 11 | ||
46 | Rockspec 3.0 | 12 | ### New rockspec format |
47 | ------------ | ||
48 | 13 | ||
49 | These features are only enabled if `rockspec_format = "3.0"` is set in the rockspec: | 14 | *New rockspec format:* if you add `rockspec_format = "3.0"` to your rockspec, |
15 | you can use a number of new features. Note that these rockspecs will only work | ||
16 | with LuaRocks 3.0 and above, but older versions will detect that directive and | ||
17 | fail gracefully, giving the user a message telling them to upgrade. Rockspecs | ||
18 | without the `rockspec_format` directive are interpreted as having format 1.0 | ||
19 | (the same format from LuaRocks series 1.x and 2.x) and are still supported. | ||
20 | |||
21 | The following features are only enabled if `rockspec_format = "3.0"` is set in | ||
22 | the rockspec: | ||
50 | 23 | ||
51 | * Build type `builtin` is the default if `build.type` is not specified. | 24 | * Build type `builtin` is the default if `build.type` is not specified. |
52 | * New table `build_dependencies`: dependencies used only for running `luarocks build` | 25 | * The `builtin` type auto-detects modules using the same heuristics as |
53 | but not when installing binary rocks. | 26 | `write_rockspec` (for example, if you have a `src` directory). With |
27 | auto-detection of the build type and modules, many rockspecs don't | ||
28 | even need an explicit `build` table anymore. | ||
29 | * New table `build_dependencies`: dependencies used only for running | ||
30 | `luarocks build` but not when installing binary rocks. | ||
54 | * New table `test_dependencies`: dependencies used only for running `luarocks test` | 31 | * New table `test_dependencies`: dependencies used only for running `luarocks test` |
55 | * New table `test`: settings for configuring the behavior of `luarocks test`. | 32 | * New table `test`: settings for configuring the behavior of `luarocks test`. |
56 | Supports a `test.type` field so that the test backend can be specified. | 33 | Supports a `test.type` field so that the test backend can be specified. |
@@ -74,14 +51,136 @@ These features are only enabled if `rockspec_format = "3.0"` is set in the rocks | |||
74 | * Patches added in `patches` can create and delete files, following standard | 51 | * Patches added in `patches` can create and delete files, following standard |
75 | patch rules. | 52 | patch rules. |
76 | 53 | ||
77 | Internal changes | 54 | ### New commands |
78 | ---------------- | 55 | |
56 | * *New command:* `luarocks init`. This command performs the setup for using | ||
57 | LuaRocks in a "project directory": | ||
58 | * it creates a `lua_modules` directory in the current directory for | ||
59 | storing rocks | ||
60 | * it creates a `.luarocks/config-5.x.lua` local configuration file | ||
61 | * it creates `lua` and `luarocks` wrapper scripts in the current | ||
62 | directory that are configured to use `lua_modules` and | ||
63 | `.luarocks/config-5.x.lua` | ||
64 | * if there are no rockspecs in the current directory, it creates one | ||
65 | based on the directory name and contents. | ||
66 | * *New command:* `luarocks test`. It runs a rock's test suite, as specified | ||
67 | in the new `test` section of the rockspec file. It also does some | ||
68 | autodetection, so it already works with many existing rocks as well. | ||
69 | * *New command:* `luarocks which`. Given the name of an installed, it tells | ||
70 | you which rock it is a part of. For example, `luarocks which lfs` | ||
71 | will tell you it is a part of `luafilesystem` (and give the full | ||
72 | path name to the module). In this sense, `luarocks which` is the | ||
73 | dual command to `luarocks show`. | ||
74 | |||
75 | ### New flags | ||
76 | |||
77 | * *New flags* `--lua-dir` and `--lua-version` which can be used with | ||
78 | all commands. This allows you to specify a Lua version and installation | ||
79 | prefix at runtime, so a single LuaRocks installation can be used | ||
80 | to manage packages for any Lua version. It is no longer necessary to | ||
81 | install separate copies of LuaRocks to manage packages for Lua 5.x | ||
82 | and 5.y. | ||
83 | * *New flags* added to `luarocks show`: `--porcelain`, giving a stable | ||
84 | script-friendly output (named after the Git `--porcelain` flag that | ||
85 | serves the same purpose) and `--rock-license`. | ||
86 | * *New flag* `--temp-key` for `luarocks upload`, allowing you to easily | ||
87 | upload rocks into an alternate account without disrupting the | ||
88 | stored configuration of your main account. | ||
89 | * *New flag* `--dev`, for enabling development-branch sub-repositories. | ||
90 | This adds support for easily requesting `dev` modules from LuaRocks.org, as in: | ||
91 | `luarocks install --dev luafilesystem`. The list of URLs configured | ||
92 | in `rocks_servers` is prepended with a list containing "/dev" in their paths. | ||
93 | * `luarocks config`, when called with no arguments, now displays your | ||
94 | entire active configuration, using the same Lua syntax as the configuration | ||
95 | file. It is sensitive to the flags given to it (`--tree`, `--lua-dir`, etc.) | ||
96 | so it presents the resulting configuration produced by loading the | ||
97 | currently-active configuration files and the given flags. | ||
98 | |||
99 | ### New build system | ||
100 | |||
101 | *New build system*: the `configure` and `Makefile` scripts were completely | ||
102 | overhauled, making use of LuaRocks 3 features to greatly simplify them: | ||
103 | |||
104 | * Much of the detection and configuration work they performed were moved | ||
105 | to runtime, to make LuaRocks more dynamic and resilient to environment | ||
106 | changes | ||
107 | * The system-package-manager-friendly mode is still available, as the | ||
108 | default target (`make`, formerly `make build`). | ||
109 | * The LuaRocks-as-a-rock mode (`make bootstrap`) is also still available, | ||
110 | and was greatly simplified: it no longer uses custom Makefiles: | ||
111 | LuaRocks installs itself using `luarocks make`, and its own rockspec | ||
112 | uses the `builtin` build mode. | ||
113 | * A new build mode: `make binary` compiles all of LuaRocks into a single | ||
114 | executable, bundling various Lua modules to make it self-sufficient, | ||
115 | such as LuaFileSystem, LuaSocket and LuaSec. | ||
116 | * For version 3.0, this will remain as an option, as we evaluate | ||
117 | its suitability moving forward to become the default mode of | ||
118 | distribution. | ||
119 | * The goal is to eventually use this mode to produce the Windows | ||
120 | version of LuaRocks. We currently include an experimental | ||
121 | `make windows-binary` target which builds a Windows version | ||
122 | using the MinGW-w64 cross-compiler on Linux. | ||
123 | |||
124 | ### General improvements | ||
125 | |||
126 | * *New feature:* [namespaces](https://github.com/luarocks/luarocks/wiki/Namespaces): | ||
127 | you can use `luarocks install user/package` to install a package from a | ||
128 | specific user of the repository. | ||
129 | * Improved defaults for finding external libraries on Linux and Windows. | ||
130 | * Detection of the Lua library and header directories is now done at runtime. | ||
131 | This uses the same machinery that LuaRocks employs for `external_dependencies` | ||
132 | in general (with some added logic to cope with the unfortunate | ||
133 | rampant inconsistency in naming of Lua libraries and header paths | ||
134 | due to lack of upstream standardization). | ||
135 | * `luarocks-admin add` now works with `file://` repositories | ||
136 | * some UI improvements in `luarocks list` and `luarocks search`. | ||
137 | * Preliminary support for the upcoming Lua 5.4: LuaRocks is written in | ||
138 | the common dialect supporting Lua 5.1-5.3 and LuaJIT, but since a | ||
139 | single installation can manage packages for any Lua version now, | ||
140 | it can already manage packages for Lua 5.4 even though that's not | ||
141 | out yet. | ||
142 | |||
143 | ### User-visible changes | ||
144 | |||
145 | * *Breaking change:* The support for deprecated unversioned paths | ||
146 | (e.g. `/usr/local/lib/luarocks/rocks/` and `/etc/luarocks/config.lua`) | ||
147 | was removed, LuaRocks will now only create and use paths versioned | ||
148 | to the specific Lua version in use | ||
149 | (e.g. `/usr/local/lib/luarocks/rocks-5.3/` and `/etc/luarocks/config-5.3.lua`). | ||
150 | * *Breaking changes:* `luarocks path` now exports versioned variables | ||
151 | `LUA_PATH_5_x` and `LUA_CPATH_5_x` instead of `LUA_PATH` and `LUA_CPATH` | ||
152 | when those are in use in your system. | ||
153 | * Package paths are sanitized to only reference the current Lua version. | ||
154 | For example, if you have `/some/dir/lua/5.1/` in your `$LUA_PATH` and | ||
155 | you are running Lua 5.2, `luarocks.loader` and the `luarocks` command-line | ||
156 | tool will convert it to `/some/dir/lua/5.2/`. | ||
157 | * LuaRocks now uses `dev` instead of `scm` as the favored version identifier | ||
158 | to describe development versions of a rock, aligning it with the terminology | ||
159 | used in https://luarocks.org. It still understands `scm` as a | ||
160 | compatibility fallback. | ||
161 | * LuaRocks no longer conflates modules `foo` and `foo.init` as being the | ||
162 | same in its internal manifest. Instead, the `luarocks.loader` module | ||
163 | is adapted to handle the `.init` case. | ||
164 | * Wrappers installed using `--tree` now prepend the tree's prefix to their | ||
165 | package paths. | ||
166 | * `luarocks-admin` commands no longer creates an `index.html` file in the | ||
167 | repository by default (it does update it if it already exists) | ||
168 | |||
169 | ### Internal changes | ||
79 | 170 | ||
80 | * Modules needed by `luarocks.loader` were moved into the `luarocks.core` namespace. | 171 | * Major improvements in the test suite done by @georgeroman as part of the ongoing |
172 | Google Summer of Code 2018 program. The coverage improvements and test suite | ||
173 | speed-ups have been essential in getting the sprint towards LuaRocks 3.0 more | ||
174 | efficient and reliable! | ||
175 | * Modules needed by `luarocks.loader` were moved below the `luarocks.core` namespace. | ||
81 | Modules in `luarocks.core` only depend on other `luarocks.core` modules. | 176 | Modules in `luarocks.core` only depend on other `luarocks.core` modules. |
82 | (Notably, `luarocks.core` does not use `luarocks.fs`.) | 177 | (Notably, `luarocks.core` does not use `luarocks.fs`.) |
83 | * Modules representing `luarocks` commands were moved into the `luarocks.cmd` namespace. | 178 | * Modules representing `luarocks` commands were moved into the `luarocks.cmd` namespace, |
84 | * Modules representing `luarocks-admin` commands were moved into the `luarocks.admin.cmd` namespace. | 179 | and `luarocks.command_line` was renamed to `luarocks.cmd`. Eventually, all CLI-related |
180 | code will live under `luarocks.cmd`, as we move towards a clean CLI-API separation, | ||
181 | in preparation for a stable public API. | ||
182 | * Likewise, modules representing `luarocks-admin` commands were moved into the | ||
183 | `luarocks.admin.cmd` namespace. | ||
85 | * New internal objects for representing interaction with the repostories: | 184 | * New internal objects for representing interaction with the repostories: |
86 | `luarocks.queries` and `luarocks.results` | 185 | `luarocks.queries` and `luarocks.results` |
87 | * Type checking rules of file formats were moved into the `luarocks.type` namespace. | 186 | * Type checking rules of file formats were moved into the `luarocks.type` namespace. |