Skip to content

Commit 6001888

Browse files
authored
Merge pull request #2200 from svaarala/v2.5.0-release-prep
Release preparations for 2.5.0 release
2 parents 44ca54f + 1fd2171 commit 6001888

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+369
-206
lines changed

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ test: apitest ecmatest
627627

628628
# Set of miscellaneous tests for release.
629629
.PHONY: releasetest
630-
releasetest: configuretest xmldoctest closuretest bluebirdtest luajstest jsinterpretertest lodashtest underscoretest emscriptenluatest emscriptenduktest emscripteninceptiontest emscriptenmandeltest emscriptentest errorinjecttest
630+
releasetest: configuretest xmldoctest closuretest bluebirdtest luajstest jsinterpretertest lodashtest underscoretest emscriptenluatest emscriptenduktest emscriptenmandeltest emscriptentest errorinjecttest
631631
@echo ""
632632
@echo "### Release tests successful!" # These tests now have output checks.
633633

@@ -1183,6 +1183,7 @@ docker-images-x64: docker-prepare
11831183
docker build -t duktape-site-ubuntu-18.04-x64 docker/duktape-site-ubuntu-18.04-x64
11841184
docker build -t duktape-duk-ubuntu-18.04-x64 docker/duktape-duk-ubuntu-18.04-x64
11851185
docker build -t duktape-shell-ubuntu-18.04-x64 docker/duktape-shell-ubuntu-18.04-x64
1186+
docker build -t duktape-release-1-ubuntu-18.04-x64 docker/duktape-release-1-ubuntu-18.04-x64
11861187

11871188
.PHONY: docker-images-s390x
11881189
docker-images-s390x: docker-prepare
@@ -1196,6 +1197,7 @@ docker-images: docker-images-x64
11961197
docker-clean:
11971198
-rm -f docker/*/gitconfig docker/*/prepare_repo.sh
11981199
-docker rmi \
1200+
duktape-release-1-ubuntu-18.04-x64:latest \
11991201
duktape-shell-ubuntu-18.04-x64:latest \
12001202
duktape-duk-ubuntu-18.04-x64:latest \
12011203
duktape-site-ubuntu-18.04-x64:latest \
@@ -1262,3 +1264,10 @@ docker-shell-wd:
12621264
.PHONY: docker-shell-wdmount
12631265
docker-shell-wdmount:
12641266
docker run -v $(shell pwd):/work/duktape --rm -ti duktape-shell-ubuntu-18.04-x64
1267+
1268+
.PHONY: docker-release-1-wd
1269+
docker-release-1-wd:
1270+
rm -f docker-input.zip docker-output.zip
1271+
#git archive --format zip --output docker-input.zip HEAD
1272+
zip -1 -q -r docker-input.zip .
1273+
docker run --rm -i -e STDIN_ZIP=1 duktape-release-1-ubuntu-18.04-x64 < docker-input.zip

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ These are also **intended for Linux only**. For example:
133133
# shell running in the container.
134134
$ make docker-shell-wdmount
135135

136+
# For non-native images you may need:
137+
# https://github.com/multiarch/qemu-user-static
138+
136139
Branch policy
137140
-------------
138141

RELEASES.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3540,10 +3540,7 @@ Miscellaneous:
35403540

35413541
* Various portability fixes (GH-1931, GH-1976)
35423542

3543-
Planned
3544-
=======
3545-
3546-
2.5.0 (XXXX-XX-XX)
3543+
2.5.0 (2019-11-24)
35473544
------------------
35483545

35493546
* Rename the 'global' binding to 'globalThis' to match updated
@@ -3582,6 +3579,9 @@ Planned
35823579

35833580
* Minor performance and footprint improvements (GH-2167, GH-2177)
35843581

3582+
Planned
3583+
=======
3584+
35853585
3.0.0 (XXXX-XX-XX)
35863586
------------------
35873587

doc/release-checklist.rst

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,19 @@ Checklist for ordinary releases
4141

4242
- Must add all new API calls
4343

44+
* Run ``make docker-release-1-wd``
45+
46+
- Check output manually
47+
4448
* Compilation tests:
4549

4650
- Clean compile for command line tool with (a) no options and (b) common
4751
debug options (DUK_USE_DEBUG, DUK_USE_DEBUG_LEVEL=0, DUK_USE_DEBUG_PRINT=...,
4852
DUK_USE_SELF_TESTS, DUK_USE_ASSERTIONS)
4953

50-
- Compile both from ``src`` and ``src-separate``.
51-
52-
- Run ``mandel.js`` to test the the command line tool works.
53-
5454
- Check that ``duk_tval`` is packed by default on x86 and unpacked on
5555
x64
5656

57-
- util/checklist_compile_test.sh: linux compiler/arch combinations,
58-
run in dist, check output manually
59-
6057
- Platform / compiler combinations (incomplete, should be automated):
6158

6259
+ FreeBSD clang
@@ -83,15 +80,8 @@ Checklist for ordinary releases
8380

8481
+ Linux SH4 gcc
8582

86-
- Check ``make duk-clang``, covers ``-Wcast-align``
87-
8883
- Check compile warnings when DUK_NORETURN() is not defined
8984

90-
* Test configure.py manually using metadata from the distributable
91-
92-
- Ensure that Duktape compiles with e.g. ``-DDUK_USE_FASTINT`` configure
93-
argument
94-
9585
* duk-sanitize-clang:
9686

9787
- Run::

doc/release-notes-v2-5.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ Main changes in this release (see RELEASES.rst for full details):
1111
(duk_cbor_encode(), duk_cbor_decode()) and ECMAScript API (CBOR.encode(),
1212
CBOR.decode()) are enabled by default.
1313

14-
* TBD.
14+
* Add duk_pull() API call.
15+
16+
* Add "globalThis" binding, enabled by default. This replaces the previous
17+
"global" binding (which was disabled by default) to match the revised
18+
"global" specification.
19+
20+
* Various fixes and portability improvements.
1521

1622
Upgrading from Duktape 2.4
1723
==========================
@@ -23,3 +29,6 @@ from Duktape v2.4.x. Note the following:
2329
``DUK_USE_CBOR_SUPPORT`` and ``DUK_USE_CBOR_BUILTIN`` config options.
2430
If you're using the CBOR extra, you should migrate to the built-in CBOR
2531
support.
32+
33+
* ``globalThis`` binding is now enabled by default; it can be disabled
34+
by disabling the ``DUK_USE_GLOBAL_BINDING`` config option.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM duktape-base-ubuntu-18.04-x64:latest
2+
3+
COPY --chown=duktape:duktape run.sh .
4+
RUN chmod 755 run.sh
5+
6+
CMD /work/run.sh
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
#!/bin/bash
2+
3+
set -e
4+
set -x
5+
6+
/work/prepare_repo.sh
7+
8+
source emsdk/emsdk_env.sh
9+
10+
cd duktape
11+
ROOT=`pwd`
12+
13+
test_combined_source_compilation() {
14+
make clean dist
15+
cd dist
16+
cat Makefile.cmdline
17+
rm -rf src-separate
18+
make -f Makefile.cmdline
19+
ls -l duk; size duk
20+
./duk mandel.js > /tmp/out.txt
21+
cat /tmp/out.txt
22+
if [ `md5sum /tmp/out.txt | cut -f 1 -d ' '` != "627cd86f0a4255e018c564f86c6d0ab3" ]; then
23+
echo "Combined source compilation failed!"
24+
exit 1
25+
fi
26+
}
27+
28+
test_separate_source_compilation() {
29+
make clean dist
30+
cd dist
31+
sed -i 's/DUKTAPE_SOURCES = src\/duktape.c/DUKTAPE_SOURCES = src-separate\/*.c/' Makefile.cmdline
32+
sed -i 's/-I.\/src/-I.\/src-separate/' Makefile.cmdline
33+
cat Makefile.cmdline
34+
rm -rf src
35+
make -f Makefile.cmdline
36+
ls -l duk; size duk
37+
./duk mandel.js > /tmp/out.txt
38+
cat /tmp/out.txt
39+
if [ `md5sum /tmp/out.txt | cut -f 1 -d ' '` != "627cd86f0a4255e018c564f86c6d0ab3" ]; then
40+
echo "Combined source compilation failed!"
41+
exit 1
42+
fi
43+
}
44+
45+
test_clang_compilation() {
46+
make clean duk-clang
47+
}
48+
49+
test_gxx_compilation() {
50+
make clean duk-g++
51+
make clean dukd-g++
52+
}
53+
54+
test_misc_compilation() {
55+
make clean duk-rom
56+
make clean duk-low
57+
make clean duk-low-norefc
58+
make clean duk-low-rom
59+
make clean duk-perf
60+
make clean duk-size
61+
make clean duk-pgo.O2
62+
make clean dukd
63+
make clean dukd-rom
64+
make clean dukd-low
65+
make clean dukd-low-norefc
66+
make clean dukd-low-rom
67+
}
68+
69+
test_configure_fastint() {
70+
make clean dist
71+
cd dist
72+
rm -rf /tmp/out
73+
python tools/configure.py -DDUK_USE_FASTINT --output-directory /tmp/out
74+
ls -l /tmp/out
75+
}
76+
77+
test_releasetest() {
78+
make clean
79+
make releasetest
80+
}
81+
82+
test_checklist_compile_test() {
83+
make clean dist
84+
cd dist
85+
bash ../util/checklist_compile_test.sh
86+
}
87+
88+
echo ""
89+
echo "*** Test compilation from combined sources"
90+
echo ""
91+
cd $ROOT
92+
test_combined_source_compilation
93+
94+
echo ""
95+
echo "*** Test compilation from separate sources"
96+
echo ""
97+
cd $ROOT
98+
test_separate_source_compilation
99+
100+
echo ""
101+
echo "*** Test clang compilation (duk-clang)"
102+
echo ""
103+
cd $ROOT
104+
test_clang_compilation
105+
106+
echo ""
107+
echo "*** Test C++ compilation (duk-g++)"
108+
echo ""
109+
cd $ROOT
110+
test_gxx_compilation
111+
112+
echo ""
113+
echo "*** Test misc compilation targets (duk-low, etc)"
114+
echo ""
115+
cd $ROOT
116+
test_misc_compilation
117+
118+
echo ""
119+
echo "*** Test configure.py -DDUK_USE_FASTINT"
120+
echo ""
121+
cd $ROOT
122+
test_configure_fastint
123+
124+
echo ""
125+
echo "*** Test make releasetest"
126+
echo ""
127+
cd $ROOT
128+
test_releasetest
129+
130+
echo ""
131+
echo "*** Test checklist_compile_test.sh"
132+
echo ""
133+
cd $ROOT
134+
test_checklist_compile_test
135+
136+
echo ""
137+
echo "*** All done!"
138+
echo ""

src-input/builtins.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,6 +2337,7 @@ objects:
23372337
setter_magic: 0
23382338
attributes: "c"
23392339
duktape: true
2340+
# XXX: columnNumber
23402341

23412342
- key: "toString"
23422343
value:

src-input/duk_api_bytecode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ static const duk_uint8_t *duk__load_func(duk_hthread *thr, const duk_uint8_t *p,
395395

396396
DUK_ASSERT(thr != NULL);
397397

398-
DUK_DD(DUK_DDPRINT("loading function, p=%p, p_end=%p", (void *) p, (void *) p_end));
398+
DUK_DD(DUK_DDPRINT("loading function, p=%p, p_end=%p", (const void *) p, (const void *) p_end));
399399

400400
DUK__ASSERT_LEFT(3 * 4);
401401
count_instr = DUK_RAW_READINC_U32_BE(p);

src-input/duk_api_stack.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6313,6 +6313,13 @@ DUK_INTERNAL duk_idx_t duk_unpack_array_like(duk_hthread *thr, duk_idx_t idx) {
63136313
* Error throwing
63146314
*/
63156315

6316+
#if defined(DUK_USE_GCC_PRAGMAS)
6317+
#pragma GCC diagnostic push
6318+
#pragma GCC diagnostic ignored "-Wsuggest-attribute=noreturn"
6319+
#elif defined(DUK_USE_CLANG_PRAGMAS)
6320+
#pragma clang diagnostic push
6321+
#endif
6322+
63166323
DUK_EXTERNAL void duk_throw_raw(duk_hthread *thr) {
63176324
duk_tval *tv_val;
63186325

@@ -6402,6 +6409,12 @@ DUK_EXTERNAL void duk_error_raw(duk_hthread *thr, duk_errcode_t err_code, const
64026409
DUK_WO_NORETURN(return;);
64036410
}
64046411

6412+
#if defined(DUK_USE_GCC_PRAGMAS)
6413+
#pragma GCC diagnostic pop
6414+
#elif defined(DUK_USE_CLANG_PRAGMAS)
6415+
#pragma clang diagnostic pop
6416+
#endif
6417+
64056418
#if !defined(DUK_USE_VARIADIC_MACROS)
64066419
DUK_NORETURN(DUK_LOCAL_DECL void duk__throw_error_from_stash(duk_hthread *thr, duk_errcode_t err_code, const char *fmt, va_list ap));
64076420

0 commit comments

Comments
 (0)