Sitelet https://github.com/lua-stdlib/lua-stdlib/commit/b873e428336e0e9c9bd05850cea92a1c473c9a71
Skip to content

Commit b873e42

Browse files
committed
configury: remove in favour of LuaRocks builtin build type.
* .prev-version, .slackid, .x-update-copyright, bootstrap, bootstrap.conf, build-aux/sanity-cfg.mk, configure.ac, local.mk, rockspec.conf, slingshot, specs/specs.mk: Delete. * AUTHORS, COPYING, HACKING, build-aux/config.ld.in: Move from here... * AUTHORS.md, LICENSE.md, STYLE.md, doc/config.ld.in: ...to here. * README.md: Update. * specs/io_spec.yaml: Fix example that checked `ls` output in current directory now that those files are gone. * .gitignore, .travis.yml, stdlib-git-1.rockspec: Update accordingly. Signed-off-by: Gary V. Vaughan <gary@gnu.org>
1 parent fcea7ad commit b873e42

22 files changed

Lines changed: 105 additions & 6246 deletions

‎.gitignore‎

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,7 @@
11
.DS_Store
2-
/.autom4te.cfg
32
/.gitmodules
4-
/ChangeLog
5-
/ChangeLog~
6-
/GNUmakefile
7-
/INSTALL
83
/Makefile
9-
/Makefile.am
10-
/Makefile.in
11-
/NEWS
12-
/README
13-
/aclocal.m4
14-
/autom4te.cache
15-
/build-aux/*
16-
!/build-aux/sanity-cfg.mk
17-
!/build-aux/config.ld.in
18-
/config.log
19-
/config.status
20-
/configure
214
/doc
22-
/lib/std/version.lua
23-
/luarocks
24-
/m4/ax_lua.m4
25-
/m4/slingshot.m4
26-
/stdlib-*.tar.gz
5+
!/doc/config.ld.in
276
/stdlib-*.rockspec
287
!/stdlib-git-*.rockspec
29-
/travis.yml.in

‎.prev-version‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎.slackid‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎.travis.yml‎

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ addons:
77

88
env:
99
global:
10+
- _VERSION=42.0.0
11+
1012
- LUAJIT_DIR=luajit-2.0
1113
- LUAJIT_VER=2.0.4
1214
- LUA53_VER=5.3.2
@@ -124,45 +126,21 @@ install:
124126
# Build from rockspec, forcing uninstall of older luarocks installed
125127
# above when testing the git rockspec, both for enforcing backwards
126128
# compatibility by default, and for ease of maintenance.
127-
- if test -f 'stdlib-42.0.0-1.rockspec'; then
128-
sudo luarocks make 'stdlib-42.0.0-1.rockspec' LUA="$LUA";
129+
- if test -f "stdlib-$_VERSION-1.rockspec"; then
130+
sudo luarocks make "stdlib-$_VERSION-1.rockspec" LUA="$LUA";
129131
else
130-
sudo luarocks make 'stdlib-git-1.rockspec' LUA="$LUA";
132+
sudo luarocks make --force 'stdlib-git-1.rockspec' LUA="$LUA";
131133
fi
132134

133135
# Clean up files created by root
134136
- sudo git clean -dfx
135-
- sudo rm -rf slingshot /tmp/ldoc
137+
- sudo rm -rf /tmp/ldoc
136138

137139

138140
script:
139-
# Reconfigure for in-tree test install.
140-
- test -f configure || ./bootstrap --verbose
141-
- ./configure --prefix="$_inst" --disable-silent-rules LUA="$LUA"
142-
143-
# Verify luarocks installation.
144-
- make installcheck || make installcheck V=1
145-
146141
# Verify local build.
147-
- make
148-
- make check || make check V=1
149-
150-
# Verify configured installation.
151-
- make install prefix="$_inst" luadir="$luadir" luaexecdir="$luaexecdir"
152-
- LUA_PATH="$luadir/?.lua;$luadir/?/init.lua;;"
153-
LUA_CPATH="$luaexecdir/?.so;;"
154-
make installcheck V=1
155-
156-
157-
# Run sanity checks on CI server, ignoring buggy automakes.
158-
after_success:
159-
- '{ _assign="=";
160-
if grep local-checks-to-skip build-aux/sanity-cfg.mk >/dev/null; then
161-
_assign="+=";
162-
fi;
163-
printf "local-checks-to-skip %s sc_vulnerable_makefile_CVE-2012-3386\n" "$_assign";
164-
} >> build-aux/sanity-cfg.mk'
165-
- 'make syntax-check || : this will usually fail on the release branch'
142+
- make check LUA=$LUA
143+
166144

167145
notifications:
168146
slack: aspirinc:JyWeNrIdS0J5nf2Pn2BS1cih

‎.x-update-copyright‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

AUTHORS renamed to AUTHORS.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
Stdlib's contributors
2-
---------------------
1+
# Stdlib's contributors
32

4-
This file lists major contributors to stdlib. If you think you should
5-
be on it, please tell the mailing list (see README for the address).
6-
Thanks also to all those who have contributed bug fixes, suggestions
7-
and support.
3+
This file lists major contributors to _stdlib_. If you think you
4+
should be on it, please raise a [github][] issue. Thanks also to all
5+
those who have contributed bug fixes, suggestions and support.
86

9-
Gary V. Vaughan now maintains stdlib, having rewritten and reorganised
7+
Gary V. Vaughan now maintains _stdlib_, having rewritten and reorganised
108
the libraries for hygiene, consistent argument type checking in debug
119
mode, and object orientation, in addition to adding a lot of new
1210
functionality.
@@ -25,3 +23,5 @@ private standard library.
2523

2624
Johann Hibschman supplied the code on which math.floor and math.round
2725
were based.
26+
27+
[github]: https://github.com/lua-stdlib/lua-stdlib/issues
File renamed without changes.

‎Makefile‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
LDOC = ldoc
2+
LUA = lua
3+
MKDIR = mkdir -p
4+
SED = sed
5+
SPECL = specl
6+
7+
luadir = lib/std
8+
SOURCES = \
9+
$(luadir)/base.lua \
10+
$(luadir)/container.lua \
11+
$(luadir)/debug.lua \
12+
$(luadir)/debug_init/init.lua \
13+
$(luadir)/init.lua \
14+
$(luadir)/io.lua \
15+
$(luadir)/list.lua \
16+
$(luadir)/math.lua \
17+
$(luadir)/object.lua \
18+
$(luadir)/package.lua \
19+
$(luadir)/set.lua \
20+
$(luadir)/strbuf.lua \
21+
$(luadir)/string.lua \
22+
$(luadir)/table.lua \
23+
$(luadir)/tree.lua \
24+
$(luadir)/version.lua \
25+
$(NOTHING_ELSE)
26+
27+
28+
all: doc
29+
30+
doc: doc/config.ld $(SOURCES)
31+
$(LDOC) -c doc/config.ld .
32+
33+
doc/config.ld: doc/config.ld.in
34+
version=`LUA_PATH=$$(pwd)'/lib/?.lua;;' $(LUA) -e 'io.stdout:write(require"std.version")'`; \
35+
$(SED) -e "s,@PACKAGE_VERSION@,$$version," '$<' > '$@'
36+
37+
38+
CHECK_ENV = LUA=$(LUA)
39+
40+
check:
41+
LUA=$(LUA) $(SPECL) $(SPECL_OPTS) specs/*_spec.yaml

‎README.md‎

Lines changed: 11 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,21 @@ by the [stdlib project][github]
88
[![Stories in Ready](https://badge.waffle.io/lua-stdlib/lua-stdlib.png?label=ready&title=Ready)](https://waffle.io/lua-stdlib/lua-stdlib)
99

1010

11-
This is a collection of Lua libraries for LuaJIT, Lua 5.1, 5.2 and 5.3.
12-
The libraries are copyright by their authors 2000-2016 (see the
11+
This is a collection of Lua libraries for Lua 5.1 (including LuaJIT), 5.2
12+
and 5.3. The libraries are copyright by their authors 2000-2016 (see the
1313
[AUTHORS][] file for details), and released under the [MIT license][mit]
1414
(the same license as Lua itself). There is no warranty.
1515

16-
Stdlib has no run-time prerequisites beyond a standard Lua system.
16+
_stdlib_ has no run-time prerequisites beyond a standard Lua system,
17+
though it will take advantage of [strict][] and [typecheck][] if they
18+
are installed.
1719

18-
[authors]: http://github.com/lua-stdlib/lua-stdlib/blob/master/AUTHORS
20+
[authors]: http://github.com/lua-stdlib/lua-stdlib/blob/master/AUTHORS.md
1921
[github]: http://github.com/lua-stdlib/lua-stdlib/ "Github repository"
2022
[lua]: http://www.lua.org "The Lua Project"
2123
[mit]: http://mit-license.org "MIT License"
24+
[strict]: https://github.com/lua-stdlib/strict "strict variables"
25+
[typecheck]: https://github.com/gvvaughan/typecheck "function type checks"
2226

2327

2428
Installation
@@ -38,47 +42,10 @@ report for example):
3842
luarocks install http://raw.githubusercontent.com/lua-stdlib/lua-stdlib/master/stdlib-git-1.rockspec
3943
```
4044

41-
The best way to install without [LuaRocks][] is to download a github
42-
[release tarball][releases] and follow the instructions in the included
43-
[INSTALL][] file. Even if you are repackaging or redistributing
44-
[stdlib][github], this is by far the most straight forward place to
45-
begin.
46-
47-
Note that you'll be responsible for providing dependencies if you choose
48-
not to let [LuaRocks][] handle them for you, though you can find a list
49-
of minimal dependencies in the [rockspec.conf][] file.
50-
51-
It is also possible to perform a complete bootstrap of the
52-
[master][github] development branch, although this branch is unstable,
53-
and sometimes breaks subtly, or does not build at all, or provides
54-
experimental new APIs that end up being removed prior to the next
55-
official release. Unfortunately, we don't have time to provide support
56-
for taking this most difficult and dangerous option. It is presumed
57-
that you already know enough to be aware of what you are getting yourself
58-
into - however, there are full logs of complete bootstrap builds in
59-
[Travis][] after every commit, that you can examine if you get stuck.
60-
Also, the bootstrap script tries very hard to tell you why it is unhappy
61-
and, sometimes, even how to fix things before trying again.
62-
63-
[install]: http://raw.githubusercontent.com/lua-stdlib/lua-stdlib/release/INSTALL
64-
[luarocks]: http://www.luarocks.org "Lua package manager"
65-
[releases]: http://github.com/lua-stdlib/lua-stdlib/releases
66-
[rockspec.conf]: http://github.com/lua-stdlib/lua-stdlib/blob/release/rockspec.conf
67-
[travis]: http://travis-ci.org/lua-stdlib/lua-stdlib/builds
68-
69-
70-
Use
71-
---
72-
73-
As well as requiring individual libraries, you can load the standard
74-
set with
45+
The best way to install without [LuaRocks][] is to copy the `functional`
46+
folder and its contents into a directory on your package search path.
7547

76-
```lua
77-
local std = require "std"
78-
```
79-
80-
Modules not in the standard set may be removed from future versions of
81-
stdlib.
48+
[luarocks]: http://www.luarocks.org "Lua package manager"
8249

8350

8451
Documentation

HACKING renamed to STYLE.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
## Lua
22

33
- Requiring any stdlib module must not leak any symbols into the global
4-
namespace. To help users who want to do that, there are monkey_patch
5-
functions in the relevant modules. For convenience when writing
6-
throw-away scripts, there's also `std.barrel()`, to replicate the
7-
behaviour of pre-hygienic stdlib.
4+
namespace.
85

96
- Any stdlib module may `require "std.base"`, and use any functions from
107
there, as well as functions from `std.debug` (and `debug_init`); but,
@@ -63,24 +60,22 @@
6360
- Do argument check all object methods (functions available from an
6461
object created by a module function -- usually listed in the
6562
`__index` subtable of the object metatable), to catch pathological
66-
calls early, preferably using a `debug.argscheck` wrapper around the
67-
internal implementatin: this way, implementation functions can call
68-
each other without excessive rechecking of argument types.
63+
calls early, preferably using a `typecheck.argscheck` wrapper around
64+
the internal implementation: this way, implementation functions can
65+
call each other without excessive rechecking of argument types.
6966

7067
- Do argument check all module functions (functions available in the
7168
table returned from requiring that module).
7269

7370
- Do argument check metamethods, to catch pathological calls early.
7471

75-
- Avoid using the `_functions` table in objects as much as possible;
76-
it slows down cloning and complicates the API.
7772

7873
## LDocs
7974

8075
- LDocs should be next to each function's argcheck wrapper (if it has
8176
one) in the export table, so that it's easy to check the consistency
8277
between the types declared in the LDocs and the argument types
83-
enforced by `debug.argscheck` or equivalent.
78+
enforced by `typecheck.argscheck` or equivalent.
8479

8580
- `backtick_references` is disabled for stdlib, if you want an inline
8681
cross-reference, use `@{reference}`.

0 commit comments

Comments
 (0)