aboutsummaryrefslogtreecommitdiff
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* show: make --deps aware of namespacesHisham Muhammad2018-04-111-1/+4
|
* queries: fix tostring()Hisham Muhammad2018-04-111-1/+1
|
* Try to isolate uses of namespaced name stringsHisham Muhammad2018-04-1113-71/+71
| | | | | | | | | | | | | Add asserts to uses of `name` arguments to check that they are not namespaced; rename namespace-able name arguments to `ns_name` and avoid some unrelated uses of the `name` argument that don't represent rock names (there are still others around, to be fixed eventually). This may cause some failures in some untested code paths with namespaced packages, but we hope to catch them with better testing. Better to be safe here than to perform filesystem operations on incorrect paths.
* Make pack_installed_rock operate on query objectsHisham Muhammad2018-04-112-8/+7
|
* Read namespace on disk search as wellHisham Muhammad2018-04-111-12/+20
|
* Add support for namespaces.Hisham Muhammad2018-04-1132-387/+612
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Beginning support for namespaced queriesHisham Muhammad2018-04-1111-76/+132
|
* add --porcelain to search helpAlec Larson2018-04-101-6/+7
|
* write_rockspec: cleanup source.identifierHisham Muhammad2018-03-301-0/+1
|
* Nicer title message for `luarocks list`Hisham Muhammad2018-03-231-1/+1
|
* upload: new flag --temp-keyHisham Muhammad2018-03-203-1/+4
| | | | | | New flag `--temp-key` for `luarocks upload`, allowing you to easily upload rocks into an alternate account without disrupting the stored configuration of your main account.
* Use posix.mkdtemp conditionallyHisham Muhammad2018-03-131-1/+5
| | | | Closes #677.
* Fix .def generation on Windows. (#767)dwenegar2018-02-141-1/+3
| | | | | According to the Lua's manual: > Once it finds a C library, this searcher first uses a dynamic link facility to link the application with the library. Then it tries to find a C function inside the library to be used as the loader. The name of this C function is the string "luaopen_" concatenated with a copy of the module name where each dot is replaced by an underscore. Moreover, if the module name has a hyphen, its prefix up to (and including) the first hyphen is removed. For instance, if the module name is a.v1-b.c, the function name will be luaopen_b_c.
* path: use versioned LUA_xPATH_5_x variablesHisham Muhammad2018-01-054-9/+25
| | | | | | | | `luarocks path` now exports versioned variables `LUA_PATH_5_x` and `LUA_CPATH_5_x` instead of `LUA_PATH` and `LUA_CPATH` when those are in use in your system. Fixes #760.
* git.lua: avoid quoting difficulties on WindowsHisham Muhammad2018-01-021-2/+2
|
* Make sure command runs from current dir on WindowsHisham Muhammad2018-01-021-1/+6
|
* Catch error when git fails to read the hashHisham Muhammad2018-01-021-0/+3
|
* Obtain a unique identifier for a rock version fetched via gitHisham Muhammad2018-01-021-0/+15
|
* When using --tree, prepend its package paths in wrappers.Hisham Muhammad2018-01-021-1/+1
| | | | Fixes #740.
* Differentiate "not found" and "fail" when deleting.Hisham Muhammad2017-12-191-4/+10
| | | | | Do not halt a deletion process when trying to delete something that was not found.
* Use util.warning instead of printerr with "Warning: "Hisham Muhammad2017-12-198-9/+9
|
* Use 'dev' instead of 'scm'.Hisham Muhammad2017-12-015-7/+11
| | | | | | Match terminology used in luarocks.org. 'scm' is still supported for compatibility reasons, but is no longer the recommended term.
* Adds --dev flag for development-branch sub-repositories. (#736)Hisham Muhammad2017-10-084-2/+19
| | | | | | | | | | | This adds support for easily requesting `dev` modules from LuaRocks.org, as in: ``` luarocks install --dev luafilesystem ``` The list of URLs configured in `rocks_servers` is prepended with a list containing "/dev" in their paths.
* fun: make function argument the last oneHisham Muhammad2017-10-081-5/+5
| | | | | Use an order that works better with the Lua function syntax.
* Reorganize luarocks.core requires and type checking tablesHisham Muhammad2017-10-0814-381/+426
| | | | | | | | | | | * For each `luarocks.core.x` module, make `luarocks.x` module load the core module explicitly as `core`, and expose its relevant methods explicitly as well (instead of using `setmetatable`). * Move all type checking out of the core, adjusting the manifest modules accordingly. * Create separate modules for the rockspec and manifest schemas in the `luarocks.type` namespace.
* Dir separator is always "/".Hisham Muhammad2017-10-087-15/+11
| | | | | | The code was already effectively using "/" as the only directory separator, even on Windows. This commit removes the unnecessary indirection.
* Move luarocks.index to luarocks.admin.indexHisham Muhammad2017-10-084-3/+3
|
* Add `luarocks which` command. (#733)Hisham Muhammad2017-10-053-3/+35
|
* luarocks.fun: a basic set of functional utilitiesHisham Muhammad2017-10-054-15/+47
| | | | | | | | | Move `array_contains` away from the `luarocks.util` kitchen sink, and add a `luarocks.fun` module with some basic functional utilities. I considered using luafun instead, but at this point the basic functionality of LuaRocks has no mandatory external dependencies, so I thought I'd just add these functions internally instead.
* 3.0: Patches can create and delete files.Hisham Muhammad2017-10-043-135/+179
|
* Patches now can create a new files from /dev/null (#692)Evgeny Shulgin2017-10-041-1/+13
|
* Fix: handle missing dependencies section in manifest.Hisham Muhammad2017-10-041-2/+2
| | | | Closes #718.
* Use versioned files only. (#734)Hisham Muhammad2017-10-041-8/+3
| | | | | | | | Let's take the opportunity of a new major version to make an important cleanup: getting rid of the error-prone unversioned configuration files. This drops support for: * Unversioned config.lua -> use config-5.x.lua * Unversioned luarocks/site_config.lua -> it always generates luarocks/core/site_config_5_x.lua * Unversioned lib/luarocks/rocks -> it always uses lib/luarocks/rocks-5.x
* Fix detection of directories on WindowsSebastian Thomschke2017-10-041-1/+1
| | | | | | | | | | | | | | | | Function tools.delete performs a test to determine if a path is a file or a directory to select the appropriate delete command rmdir vs del. The current test however results in rmdir being used on files too, which then results in a build abortion with error "The directory name is invalid.". E.g. if exist "c:\luarocks\share\lua\5.2\luasocket_3_0rc1_2-socket.lua\" ( echo "I am a folder" ) else ( echo "I am a file" ) wrongly prints "I am a folder" (tested on Windows 10) Whereas if exist "c:\luarocks\share\lua\5.2\luasocket_3_0rc1_2-socket.lua\*" ( echo "I am a folder" ) else ( echo "I am a file" ) correctly prints "I am a file" (tested on Windows 10) This fixes #670 (Also see https://stackoverflow.com/a/1466528/1793220 )
* Use __tostring to represent versions as strings.Hisham Muhammad2017-10-032-20/+9
|
* Safer comparison number.Hisham Muhammad2017-10-031-2/+2
| | | | | Ensures the special values for dev versions are higher than versions like 20171002.
* Revert commited `make build` changes in src/binPeter Melnichenko2017-09-302-4/+2
|
* Travis: speed up buildHisham Muhammad2017-09-292-2/+4
|
* Refactor download() functionHisham Muhammad2017-09-291-31/+47
|
* Fix: don't eat up one slash when fixing the pathHisham Muhammad2017-09-291-1/+1
|
* Nicer title message for `luarocks search`Hisham Muhammad2017-09-291-1/+2
|
* Document cache option.Hisham Muhammad2017-09-292-0/+4
|
* Be stricter when autodetecting `source.dir`Hisham Muhammad2017-09-291-7/+6
| | | | | Only assume directory is the location when the tarball contains only a single directory at the top level.
* Remove debugging codeHisham Muhammad2017-09-291-1/+0
|
* Make sure package paths only reference current Lua versionHisham Muhammad2017-09-294-12/+18
|
* read just one line when checking md5Michal Cichra2017-09-261-1/+1
| | | | in some cases reading the whole file fails (on macOS High Sierra, LuaJIT) this is timing dependent and waiting between spawning and reading solves the issue as well
* Speed up type checkingHisham Muhammad2017-09-132-4/+9
|
* Fix version cacheHisham Muhammad2017-09-131-9/+9
|
* Merge branch 'luarocks-3'Hisham Muhammad2017-09-1367-2267/+2403
|\
| * Add sanity check for lua.hHisham Muhammad2017-04-171-0/+9
| |