Skip to content

Commit f43d5b5

Browse files
mtwebsterclefebvre
authored andcommitted
Rebase onto gjs-1.82.1 (from debian 13/trixie) - mozjs 128 support.
1 parent cdd8537 commit f43d5b5

285 files changed

Lines changed: 28463 additions & 4680 deletions

File tree

Some content is hidden

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

.clangd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# SPDX-License-Identifier: MIT OR LGPL-2.0-or-later
2+
# SPDX-FileCopyrightText: 2024 Philip Chimento <philip.chimento@gmail.com>
3+
4+
Diagnostics:
5+
ClangTidy:
6+
Remove: bugprone-sizeof-expression # Interferes with g_clear_pointer()

.eslintrc.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ rules:
3030
- error
3131
- arrays: always-multiline
3232
objects: always-multiline
33+
imports: always-multiline
3334
functions: never
3435
comma-spacing:
3536
- error
@@ -68,12 +69,16 @@ rules:
6869
jsdoc/check-tag-names: error
6970
jsdoc/check-types: error
7071
jsdoc/implements-on-classes: error
71-
jsdoc/newline-after-description: error
7272
jsdoc/require-jsdoc: error
7373
jsdoc/require-param: error
7474
jsdoc/require-param-description: error
7575
jsdoc/require-param-name: error
7676
jsdoc/require-param-type: error
77+
jsdoc/tag-lines:
78+
- error
79+
- always
80+
- count: 0
81+
startLines: 1
7782
key-spacing:
7883
- error
7984
- beforeColon: false

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,13 @@
33
/tools/node_modules
44
# artifact from ci-templates:
55
/container-build-report.xml
6+
debian/tmp
7+
debian/libcjs0
8+
debian/libcjs-dbg
9+
debian/libcjs-dev
10+
debian/cjs
11+
debian/.debhelper
12+
debian/*.substvars
13+
debian/*.debhelper.log
14+
debian/debhelper-build-stamp
15+
debian/files

.gitlab-ci.yml

Lines changed: 76 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ stages:
1414

1515
.gjs-alpine:
1616
variables:
17-
FDO_DISTRIBUTION_TAG: '2022-11-02.0'
17+
FDO_DISTRIBUTION_TAG: '2024-07-28.0'
1818
FDO_UPSTREAM_REPO: GNOME/gjs
1919

2020
build-alpine-image:
@@ -23,16 +23,17 @@ build-alpine-image:
2323
- .gjs-alpine
2424
stage: prepare
2525
variables:
26-
FDO_DISTRIBUTION_PACKAGES: cppcheck git python3 npm bash grep
26+
FDO_DISTRIBUTION_PACKAGES: |
27+
bash cppcheck git grep npm py3-codespell python3 reuse
2728
FDO_DISTRIBUTION_EXEC: |
28-
python3 -m ensurepip &&
29-
rm -r /usr/lib/python*/ensurepip &&
30-
pip3 install --no-cache --upgrade cpplint reuse codespell &&
31-
mkdir -p /cwd
29+
mkdir -p /cwd &&
30+
apk add cpplint \
31+
--repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/
3232
3333
.coverage: &coverage
34-
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
34+
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs128-debug
3535
variables:
36+
GIT_SUBMODULE_STRATEGY: normal
3637
coverage: '/^ lines.*(\d+\.\d+\%)/'
3738
script:
3839
- export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
@@ -61,7 +62,13 @@ build-alpine-image:
6162
when: always
6263
paths:
6364
- _build/compile_commands.json
65+
- _build/installed-tests/js/jsunit-resources.c
66+
- _build/installed-tests/js/jsunit-resources.h
67+
- _build/js-resources.c
68+
- _build/js-resources.h
6469
- _build/meson-logs/*log*.txt
70+
- _build/test/mock-js-resources.c
71+
- _build/test/mock-js-resources.h
6572
script:
6673
- test/test-ci.sh SETUP
6774
- test/test-ci.sh BUILD
@@ -74,8 +81,9 @@ build-alpine-image:
7481
build_recommended:
7582
<<: *build
7683
stage: source_check
77-
image: registry.gitlab.gnome.org/gnome/gjs:job-3012153_fedora.mozjs115-debug # pinned on purpose
84+
image: registry.gitlab.gnome.org/gnome/gjs:job-4161430_fedora.mozjs128-debug # pinned on purpose
7885
variables:
86+
GIT_SUBMODULE_STRATEGY: normal
7987
TEST_OPTS: --verbose --no-stdsplit --print-errorlogs --setup=verbose
8088
except:
8189
- schedules
@@ -85,13 +93,13 @@ sanitizer_gcc:
8593
stage: test
8694
tags:
8795
- asan # LSAN needs CAP_SYS_PTRACE
88-
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
96+
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs128-debug
8997
variables:
98+
GIT_SUBMODULE_STRATEGY: normal
9099
CONFIG_OPTS: -Db_sanitize=address,undefined
91100
TEST_OPTS: --timeout-multiplier=3
92101
# Override these during build, but they are overridden by meson anyways
93102
ASAN_OPTIONS: start_deactivated=true,detect_leaks=0
94-
USE_UNSTABLE_GNOME_PREFIX: 'true'
95103
except:
96104
- schedules
97105

@@ -102,11 +110,11 @@ sanitizer_thread_gcc:
102110
allow_failure: true
103111
tags:
104112
- asan # TSAN needs CAP_SYS_PTRACE
105-
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
113+
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs128-debug
106114
variables:
115+
GIT_SUBMODULE_STRATEGY: normal
107116
CONFIG_OPTS: -Db_sanitize=thread
108117
TEST_OPTS: --timeout-multiplier=3 --setup=verbose
109-
USE_UNSTABLE_GNOME_PREFIX: 'true'
110118
except:
111119
- schedules
112120

@@ -116,11 +124,11 @@ sanitizer_thread_gcc:
116124
build_maximal:
117125
when: on_success
118126
stage: test
119-
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
127+
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs128-debug
120128
variables:
129+
GIT_SUBMODULE_STRATEGY: normal
121130
CC: clang
122131
CXX: clang++
123-
USE_UNSTABLE_GNOME_PREFIX: 'true'
124132
CONFIG_OPTS: >-
125133
-Ddtrace=true -Dsystemtap=true -Dverbose_logs=true -Db_pch=false
126134
ENABLE_GTK: "yes"
@@ -143,20 +151,20 @@ build_maximal:
143151
build_minimal:
144152
<<: *build
145153
stage: test
146-
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115
154+
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs128
147155
variables:
148-
CONFIG_OPTS: >-
149-
-Dbuildtype=release
150-
-Dcairo=disabled -Dreadline=disabled -Dprofiler=disabled
156+
GIT_SUBMODULE_STRATEGY: normal
157+
CONFIG_OPTS: -Dbuildtype=release -Dreadline=disabled -Dprofiler=disabled
151158
TEST_OPTS: --setup=verbose
152159
except:
153160
- schedules
154161

155162
build_unity:
156163
<<: *build
157164
stage: test
158-
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115
165+
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs128
159166
variables:
167+
GIT_SUBMODULE_STRATEGY: normal
160168
# unity-size here is forced to use an high number to check whether we can
161169
# join all the sources together, but should not be used in real world to
162170
# not to break multi-jobs compilation
@@ -205,10 +213,22 @@ cppcheck:
205213
extends:
206214
- .fdo.distribution-image@alpine
207215
- .gjs-alpine
208-
stage: source_check
216+
stage: test # so that we have compile_commands.json and generated C files
209217
script:
210218
- cppcheck --version
211-
- cppcheck . -v -f -q -UHAVE_PRINTF_ALTERNATIVE_INT --error-exitcode=1 --inline-suppr --library=gtk,tools/cppcheck.cfg --enable=warning,performance,portability
219+
# Create fake g-i test files, we are not analyzing them anyway
220+
- mkdir -p subprojects/gobject-introspection-tests
221+
- |
222+
touch \
223+
subprojects/gobject-introspection-tests/annotation.{c,h} \
224+
subprojects/gobject-introspection-tests/drawable.{c,h} \
225+
subprojects/gobject-introspection-tests/foo.{c,h} \
226+
subprojects/gobject-introspection-tests/gimarshallingtests.{c,h} \
227+
subprojects/gobject-introspection-tests/regress.{c,h} \
228+
subprojects/gobject-introspection-tests/regress-unix.{c,h} \
229+
subprojects/gobject-introspection-tests/warnlib.{c,h} \
230+
subprojects/gobject-introspection-tests/utility.{c,h}
231+
- ./tools/run_cppcheck.sh -q
212232
except:
213233
refs:
214234
- schedules
@@ -265,33 +285,38 @@ eslint:
265285
- .eslintrc.yml
266286
- '**/.eslintrc.yml'
267287

268-
pch_check:
288+
headers_check:
269289
when: on_success
270290
stage: source_check
271291
extends:
272292
- .fdo.distribution-image@alpine
273293
- .gjs-alpine
274294
script:
275295
- env SELFTEST=1 test/check-pch.sh
296+
- env SELFTEST=1 test/check-headers.sh
276297
- test/check-pch.sh
298+
- test/check-headers.sh
277299
except:
278300
refs:
279301
- schedules
280302
- tags
281303
variables:
282-
- $CI_COMMIT_MESSAGE =~ /\[skip pch_check\]/
304+
- $CI_COMMIT_MESSAGE =~ /\[skip headers_check\]/
283305
only:
284306
changes:
285307
- "**/*.c"
286308
- "**/*.cpp"
287309
- "**/*.h"
288310
- "**/*.hh"
289311
- test/check-pch.sh
312+
- test/check-headers.sh
290313

291314
iwyu:
292315
when: on_success
293316
stage: source_check
294-
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
317+
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs128-debug
318+
variables:
319+
GIT_SUBMODULE_STRATEGY: normal
295320
script:
296321
- test/test-ci.sh UPSTREAM_BASE
297322
- meson setup _build -Db_pch=false
@@ -301,8 +326,11 @@ iwyu:
301326
refs:
302327
- branches
303328
except:
304-
- schedules
305-
- /^gnome-\d+-\d+$/
329+
refs:
330+
- schedules
331+
- /^gnome-[-\d]+$/
332+
variables:
333+
- $CI_COMMIT_MESSAGE =~ /\[skip iwyu\]/
306334

307335
codespell:
308336
when: on_success
@@ -316,7 +344,7 @@ codespell:
316344
codespell -S "*.png,*.po,*.jpg,*.wrap,.git,LICENSES" -f \
317345
--builtin "code,usage,clear" \
318346
--skip="./build/maintainer-upload-release.sh,./installed-tests/js/jasmine.js,./README.md,./build/flatpak/*.json,./tools/package-lock.json" \
319-
--ignore-words-list="afterall,deque,falsy,files',filetest,gir,inout,musl,nmake,stdio,uint,upto,xdescribe"
347+
--ignore-words-list="aas,afterall,deque,falsy,files',filetest,gir,inout,musl,nmake,stdio,uint,upto,ws,xdescribe"
320348
except:
321349
- schedules
322350

@@ -346,7 +374,9 @@ coverage:
346374
iwyu-full:
347375
when: manual
348376
stage: manual
349-
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
377+
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs128-debug
378+
variables:
379+
GIT_SUBMODULE_STRATEGY: normal
350380
script:
351381
- meson setup _build
352382
- ./tools/run_iwyu.sh
@@ -358,11 +388,11 @@ sanitizer_clang:
358388
stage: manual
359389
tags:
360390
- asan # LSAN needs CAP_SYS_PTRACE
361-
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
391+
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs128-debug
362392
variables:
393+
GIT_SUBMODULE_STRATEGY: normal
363394
CC: clang
364395
CXX: clang++
365-
USE_UNSTABLE_GNOME_PREFIX: 'true'
366396
# Override these during build, but they are overridden by meson anyways
367397
ASAN_OPTIONS: start_deactivated=true,detect_leaks=0
368398
CONFIG_OPTS: -Db_sanitize=address,undefined -Db_lundef=false
@@ -374,8 +404,9 @@ sanitizer_clang:
374404
installed_tests:
375405
<<: *build
376406
stage: manual
377-
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
407+
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs128-debug
378408
variables:
409+
GIT_SUBMODULE_STRATEGY: normal
379410
CONFIG_OPTS: -Dinstalled_tests=true -Dprefix=/usr
380411
TEST: skip
381412
when: manual
@@ -390,9 +421,9 @@ installed_tests:
390421
valgrind:
391422
<<: *build
392423
stage: manual
393-
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
424+
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs128-debug
394425
variables:
395-
USE_UNSTABLE_GNOME_PREFIX: 'true'
426+
GIT_SUBMODULE_STRATEGY: normal
396427
TEST_OPTS: --setup=valgrind
397428
allow_failure: true
398429
when: manual
@@ -403,8 +434,9 @@ valgrind:
403434
zeal_2:
404435
<<: *build
405436
stage: manual
406-
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
437+
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs128-debug
407438
variables:
439+
GIT_SUBMODULE_STRATEGY: normal
408440
TEST_OPTS: --setup=extra_gc
409441
when: manual
410442
except:
@@ -413,8 +445,9 @@ zeal_2:
413445
zeal_4:
414446
<<: *build
415447
stage: manual
416-
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
448+
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs128-debug
417449
variables:
450+
GIT_SUBMODULE_STRATEGY: normal
418451
TEST_OPTS: --setup=pre_verify
419452
when: manual
420453
except:
@@ -423,8 +456,9 @@ zeal_4:
423456
zeal_11:
424457
<<: *build
425458
stage: manual
426-
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
459+
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs128-debug
427460
variables:
461+
GIT_SUBMODULE_STRATEGY: normal
428462
TEST_OPTS: --setup=post_verify
429463
when: manual
430464
except:
@@ -465,28 +499,28 @@ zeal_11:
465499
BUILDAH_FORMAT: docker
466500
BUILDAH_ISOLATION: chroot
467501

468-
fedora.mozjs102:
502+
fedora.mozjs115:
469503
<<: *create_docker_image
470504
variables:
471505
<<: *docker_variables
472506
DOCKERFILE: test/extra/Dockerfile
473507

474-
fedora.mozjs102-debug:
508+
fedora.mozjs115-debug:
475509
<<: *create_docker_image
476510
variables:
477511
<<: *docker_variables
478512
DOCKERFILE: test/extra/Dockerfile.debug
479513

480-
fedora.mozjs115:
514+
fedora.mozjs128:
481515
<<: *create_docker_image
482516
variables:
483517
<<: *docker_variables
484518
DOCKERFILE: test/extra/Dockerfile
485-
ARGS: --build-arg MOZJS_BRANCH=mozjs115 --build-arg MOZJS_BUILDDEPS=mozjs102
519+
ARGS: --build-arg MOZJS_BRANCH=mozjs128 --build-arg MOZJS_BUILDDEPS=mozjs115
486520

487-
fedora.mozjs115-debug:
521+
fedora.mozjs128-debug:
488522
<<: *create_docker_image
489523
variables:
490524
<<: *docker_variables
491525
DOCKERFILE: test/extra/Dockerfile.debug
492-
ARGS: --build-arg MOZJS_BRANCH=mozjs115 --build-arg MOZJS_BUILDDEPS=mozjs102
526+
ARGS: --build-arg MOZJS_BRANCH=mozjs128 --build-arg MOZJS_BUILDDEPS=mozjs115

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# SPDX-License-Identifier: CC0-1.0
2+
# SPDX-FileCopyrightText: 2024 Philip Chimento <philip.chimento@gmail.com>
3+
[submodule "subprojects/gobject-introspection-tests"]
4+
path = subprojects/gobject-introspection-tests
5+
url = ../gobject-introspection-tests.git
6+
shallow = true

0 commit comments

Comments
 (0)