Skip to content

Commit f5d9a37

Browse files
authored
Prepare mozjs-sys for publishing (#617)
* Update mozjs_sys publishing excludes Most of the previous folders don't exist anymore. `testing` is 60MiB uncompressed, so we don't want to ship that. Signed-off-by: Jonathan Schwender <[email protected]> * Prevent python bytecode cache Cargo will complain when publishing if the source directory is polluted during build. Signed-off-by: Jonathan Schwender <[email protected]> * Remove old-configure from makefile.cargo The file doesn't exist anymore, so we shouldn't touch it. This prevents cargo publish from complaining about failed package verification. Cargo will complain when publishing if the source directory is polluted during build. Signed-off-by: Jonathan Schwender <[email protected]> * Update authors for mozjs-sys Add the servo project developers to the authors. This should make it more clear that this is not an official mozilla crate. We don't remove Mozilla from the list, since they are the primary authors of spidermonkey, aka. the main content of this crate. Signed-off-by: Jonathan Schwender <[email protected]> * filter repo instead of excluding on publish Signed-off-by: Jonathan Schwender <[email protected]> * bump version Signed-off-by: Jonathan Schwender <[email protected]> --------- Signed-off-by: Jonathan Schwender <[email protected]>
1 parent ae642f8 commit f5d9a37

File tree

1,947 files changed

+50
-381687
lines changed

Some content is hidden

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

1,947 files changed

+50
-381687
lines changed

mozjs-sys/Cargo.toml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22
name = "mozjs_sys"
33
description = "System crate for the Mozilla SpiderMonkey JavaScript engine."
44
repository.workspace = true
5-
version = "0.140.0-3"
6-
authors = ["Mozilla"]
5+
version = "0.140.0-4"
6+
authors = ["Mozilla", "The Servo Project Developers"]
77
links = "mozjs"
88
license.workspace = true
99
exclude = [
10-
"mozjs/js/src/tests/**",
11-
"mozjs/js/src/octane/**",
12-
"mozjs/js/src/jit-test/**",
13-
"mozjs/js/src/jsapi-tests/**",
14-
"mozjs/js/src/doc/**",
10+
"__pycache__",
11+
"/etc/",
12+
"/mozjs/.cargo/",
13+
1514
]
1615
edition.workspace = true
1716

mozjs-sys/build.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ fn build_spidermonkey(build_dir: &Path) {
181181
}
182182
}
183183

184+
// Tell python to not write bytecode cache files, since this will pollute
185+
// the source directory.
186+
cmd.env("PYTHONDONTWRITEBYTECODE", "1");
187+
184188
let encoding_c_mem_include_dir = env::var("DEP_ENCODING_C_MEM_INCLUDE_DIR").unwrap();
185189
let mut cppflags = OsString::from(format!(
186190
"-I{} ",

mozjs-sys/etc/filters.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
- /testing/mozbase/rust
3535
- /third_party/rust
3636
- /Cargo.toml
37+
- /.cargo
3738

3839
# Keep zlib headers for libz-rs-sys
3940
+ modules/zlib/src/
@@ -45,5 +46,21 @@
4546
- /third_party/python/Jinja2
4647
- /third_party/python/jinja2
4748

49+
# Remove unused python dependencies to reduce the size
50+
- third_party/python/aiohttp
51+
52+
# pip is 8 MiB and we can assume it is installed
53+
- third_party/python/pip
54+
55+
# Best effort approach to prune unneeded testing code, while
56+
# minimising required changes to the build system.
57+
- python/mozperftest/mozperftest/system/example.zip
58+
- python/mozperftest/mozperftest/tests/data
59+
- testing/mozharness
60+
- testing/mozbase/mozproxy
61+
- testing/mozbase/**/tests
62+
- testing/performance/
63+
- testing/test/
64+
4865
# Include the rest.
4966
+ /*
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
diff --git a/testing/moz.build b/testing/moz.build
2+
--- a/testing/moz.build (revision 60271caa713296c479a4b2fd66a8dd4a07143303)
3+
+++ b/testing/moz.build (date 1755799762170)
4+
@@ -1,19 +1,0 @@
5+
-with Files("**"):
6+
- BUG_COMPONENT = ("Testing", "General")
7+
-
8+
-with Files("*cppunittest*"):
9+
- BUG_COMPONENT = ("Testing", "CPPUnitTest")
10+
- SCHEDULES.exclusive = ["cppunittest"]
11+
-
12+
-with Files("remote*"):
13+
- BUG_COMPONENT = ("GeckoView", "General")
14+
-
15+
-PYTHON_UNITTEST_MANIFESTS += ["test/python.toml"]
16+
-
17+
-SPHINX_TREES["/testing"] = "docs"
18+
-
19+
-DIRS += ["mozbase", "mozharness"]
20+
-
21+
-PERFTESTS_MANIFESTS += [
22+
- "performance/perftest.toml",
23+
-]

mozjs-sys/makefile.cargo

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,8 @@ CONFIGURE_INPUTS := "$(CC)$(CFLAGS)$(CPP)$(CPPFLAGS)$(CXX)$(CXXFLAGS)$(AS)$(AR)$
154154
LAST_CONFIGURE_INPUTS := "$(shell cat reconfigure.inputs)"
155155
maybe-configure:
156156
[[ $(JSSRC)/configure -ot $(JSSRC)/configure.in ]] && touch $(JSSRC)/configure || true
157-
[[ $(JSSRC)/old-configure -ot $(JSSRC)/old-configure.in ]] && touch $(JSSRC)/old-configure || true
158157
[[ $(LAST_CONFIGURE_INPUTS) != $(CONFIGURE_INPUTS) ]] && touch $(JSSRC)/configure || true
159158
! [[ $(JSSRC)/configure.in -ot $(JSSRC)/configure ]] && touch $(JSSRC)/configure || true
160-
! [[ $(JSSRC)/old-configure.in -ot $(JSSRC)/old-configure ]] && touch $(JSSRC)/old-configure || true
161159
if [[ $(JSSRC)/configure -nt config.status ]] ; then \
162160
( echo "$(CONFIGURE_INPUTS)" > reconfigure.inputs ); \
163161
CC="$(CC)" CFLAGS="$(CFLAGS)" \

mozjs-sys/mozjs/.cargo/config.toml.in

Lines changed: 0 additions & 138 deletions
This file was deleted.
-6.28 MB
Binary file not shown.

mozjs-sys/mozjs/python/mozperftest/mozperftest/tests/data/WPT_fakekey.txt

Whitespace-only changes.

mozjs-sys/mozjs/python/mozperftest/mozperftest/tests/data/alert-mock-data/alert-summary-awsy.json

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

mozjs-sys/mozjs/python/mozperftest/mozperftest/tests/data/alert-mock-data/alert-summary-mpt-android.json

Lines changed: 0 additions & 128 deletions
This file was deleted.

0 commit comments

Comments
 (0)