summaryrefslogtreecommitdiff
path: root/spec/util (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-02-27binary: encode dependency order (luasec depends on luasocket)Hisham Muhammad1-10/+22
2024-02-27deps: bump luasocket and luasecHisham Muhammad3-26/+145
2024-02-27deps: bump zlib versionHisham Muhammad1-1/+1
2024-02-27binary: dkjson is no longer a dependency, it is now vendored inHisham Muhammad1-1/+0
2024-02-27fix: more resilient sysconfdir detectionHisham Muhammad1-1/+5
2024-02-27tests: reorganize and speed up unit testsHisham Muhammad46-736/+743
2024-02-27fix(fs): make copy_contents behavior consistent on UnixHisham Muhammad1-1/+4
Make it match the win32 behavior.
2024-02-27fix(fs): make current_dir always return 1 arg onlyHisham Muhammad10-5/+11
2024-02-27tests(fetch): do not use restserverHisham Muhammad4-282/+309
2024-02-27tests(build): split unit and integration filesHisham Muhammad2-352/+369
use restserver only in integration part
2024-02-27perf: speed up untar operationHisham Muhammad1-4/+21
2024-02-26tests: enable coverage on quick testsHisham Muhammad1-2/+3
2024-02-26fix: prevent LuaRocks from blocking lfs from removal on WindowsHisham Muhammad1-0/+1
Prevent LuaRocks itself from using installed modules and blocking their files from removal. This is not an issue on luarocks.exe because its own copy of lfs is statically linked. We need to eventually switch to using that always, but for now this is a workable solution. Fixes #1428.
2024-02-26tests: replace some more tests with quick testsHisham Muhammad3-84/+287
2024-02-25fix: if --lua-* flags are given, don't use the hardcoded pathsHisham Muhammad2-15/+26
Thanks @Frityet for the help with troubleshooting! Fixes #1611
2024-02-23fix: better normalization for paths and slashesHisham Muhammad23-384/+489
Fixes #1195.
2024-02-23tests: introduce quick testsHisham Muhammad13-68/+706
2024-02-21fix: handle error if test.command is not a string.Hisham Muhammad2-0/+57
Fixes #1055.
2024-02-21fix(init): do not write spurious .gitignore entriesHisham Muhammad1-2/+2
2024-02-20Makefile: make install target phonyHisham Muhammad1-32/+30
Fixes #1038.
2024-02-20ci: don't run luacheck twice on pull requestsHisham Muhammad1-1/+5
2024-02-20ci: run main tests on master branch as wellHisham Muhammad1-1/+1
2024-02-20fix: let runtime detection handle LUALIB filenameHisham Muhammad2-5/+2
This should be more flexible than hardcoding a value that may become incorrect once people reconfigure their LuaRocks to point to another Lua distribution, especially on Windows. Fixes #905.
2024-02-20improve and simplify Lua interpreter searchHisham Muhammad6-41/+50
* do not proceed with commands if interpreter is not found * begin retiring LUA_DIR and LUA_BINDIR, and promote LUA as the main way to setup the interpreter location (from which we derive the rest)
2024-02-19fix: don't show "no downloader" error for every mirrorHisham Muhammad4-7/+10
2024-02-19fix(init): inject project's package.(c)path in lua wrapper scriptHisham Muhammad1-1/+20
Fixes #924.
2024-02-19fix(init): use absolute paths when deletingHisham Muhammad1-2/+2
Thanks to @imolein for pointing it out!
2024-02-19fix(config): print boolean values correctly on Lua 5.1Hisham Muhammad2-1/+19
2024-02-19fix(lint): don't crash when missing descriptionHisham Muhammad2-2/+16
2024-02-19fix(build): don't look for Lua headers when installing pure-Lua rocksHisham Muhammad6-174/+228
This only applies to 'builtin' as we can't know about other modes, but this should be good enough. Fixes #1275.
2024-02-19improve dependency match messageHisham Muhammad1-1/+1
2024-02-19fix(config): ensure directory exists when saving config fileHisham Muhammad1-3/+10
Fixes #1261.
2024-02-19when picking a default dependency dir, look for lib/ firstHisham Muhammad2-9/+19
When a rockspec specifies `external_dependencies` but those don't define a `library` entry, we don't have a way to check for the various possible `external_deps_subdirs` to find the one that contains the library. (But people really should specify a `library` entry there if they're linking the library!) Previously, we were just picking the first one from the list. On Windows, this meant that sometimes setting `MY_DEPENDENCY_DIR` would not be sufficient if the library was under `$MY_DEPENDENCY_DIR/lib`, because "" was picked first. We now improve the heuristic by putting "lib" first on the list and checking if it exists. I'm still keeping "bin" in the end of the list, because I think this is less common that a flat directory structure on Windows, so "lib" covers the Unix-like trees and "" covers flat trees (I don't remember why have "bin" as a library subdir on Windows, but if it's there then we must have seen it in the wild!) This means that "bin" will never get auto-picked by this heuristic, but it will be available for the cases where `library` _is_ set. While I'm at it, I also flipped the order of some Unix entries, so that this heuristic for these kind of rockspecs gets a nicer behavior on Unix systems that have things like `/usr/lib64` and `/usr/lib/<platform>` as well. Fixes #1041.
2024-02-19fix(builtin): compile C modules in a temp directoryHisham Muhammad2-6/+34
Fixes #1492.
2024-02-19vendor in the dkjson dependencyHisham Muhammad6-47/+750
Fixes #1243. Fixes #1168. Fixes #559.
2024-02-19silence warning which only appears when rebuilding manifestHisham Muhammad1-1/+0
Fixes #1446.
2024-02-19normalize project dirHisham Muhammad1-1/+1
Avoid showing things like `/foo/bar/../.././lua_modules` when running `luarocks path`.
2024-02-19feat(path): add --full flag for --lr-path and --lr-cpathHisham Muhammad1-14/+26
By default, `--lr-path` and `--lr-cpath` only include the paths derived by the LuaRocks rocks_trees. Using `--full` includes any other components defined in your system's package.(c)path, either via the running interpreter's default paths or via `LUA_(C)PATH(_5_x)` environment variables (in short, using `--full` produces the same lists as shown in the shell outputs of `luarocks path`. Closes #1351.
2024-02-19fix program search when using absolute paths and .exe extensionsHisham Muhammad2-1/+25
Fixes #1001. Thanks @badrazizi for the suggestion!
2024-02-18fix: do not attempt setting exec permissions for folders on WindowsHisham Muhammad1-3/+5
Not sure of what are the circumstances that make this cause problems on Windows, but running this shouldn't be necessary on Windows, since the concept of "execute permissions for directories means traversal permissions" is a Unixism. Fixes #991.
2024-02-18drop cfg.lua_interpreter, use cfg.variables.LUAHisham Muhammad15-134/+189
2024-02-18ci: bump actions/checkout in luacheck.ymlHisham Muhammad1-1/+1
...to get rid of the GitHub Actions warning about Node.js 16
2024-02-17feat(builtin): inherit inc and libdirs from external_dependenciesHisham Muhammad1-4/+5
If a rockspec has external_dependencies but the module entry does not specify incdirs or libdirs, then autoextract those values from external_dependencies and apply it to the module entry. Hopefully this will improve compatibility of existing rockspecs that did not fully specify their incdirs and libdirs, such as https://github.com/brimworks/lua-yajl/blob/078e48147e89d34b8224a07129675aa9b5820630/rockspecs/lua-yajl-2.0-1.rockspec Fixes #1239.
2024-02-17fix: catch the failure to setup LUA_BINDIR early.Hisham Muhammad1-0/+6
Fixes #1202.
2024-02-17fix(show): print commands correctly in --porcelain modeHisham Muhammad1-2/+1
2024-02-17fix(build): report if zip is unavailable for --pack-binary-rockHisham Muhammad1-2/+3
Fixes #1414.
2024-02-17fix(build): add some validation to the build tableHisham Muhammad1-0/+6
LuaRocks does not validate the contents of the build table because each backend defines it on this own. These validations should be enough to address #1477, but ideally each bundled `build` backend should have its own validator like the one on `luarocks.type.rockspec`. Fixes #1477.
2024-02-17fix: install build_dependencies on the correct Lua versionHisham Muhammad2-6/+37
When installing build dependencies, do so for the Lua version on which the LuaRocks program is actually running, and not the one selected by the user via config or `--lua-version`. To do that, we temporarily flip the user-selected Lua version. It's a hacky approach because we have to do this by flipping a bunch of global config settings, and we may be missing some entries. This definitely needs a better solution, but this is what can be done somewhat easily in the current architecture. A full solution needs to address have several complications (e.g. if you have a build dependency that needs to be compiled, it will require C headers for another version of LuaRocks, and the binary might be compiled with a different Lua version than the one the developer has set up in their machine.)
2024-02-17fix(config): update system config by default with local_by_default = falseRoman Orekhov1-1/+1
Fixes #1512.
2024-02-17feat(init): add --no-gitignore, --no-wrapper-scripts, --wrapper-dirHisham Muhammad2-32/+129
Closes #1513.