aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo
Commit message (Collapse)AuthorAgeFilesLines
...
* build: Use `--keep-going` in `./mach doc` (#31119)Martin Robinson2024-01-181-0/+5
| | | | | | | | | | The documentation build for `gstreamer-gl-x11` depends on nightly Rust for some reason, which breaks our doc build. Use `--keep-going` to prevent breakage in dependencies from breaking our doc build. This unfortunately hides issues in our own documentation build. NB: It isn't possible to exclude dependencies with `--exclude` unless you are using `--workspace`. We would probably like to do that, but we have crates with the same name, preventing using `--workspace`.
* build: Clean up post-build copy of Windows DLLs (#31092)Martin Robinson2024-01-173-183/+189
| | | | | | | | | | | | | | * build: Clean up post-build copy of Windows DLLs - No longer use vcvarsall.bat at all. Instead find the Windows SDK directory by looking in the registry. - Split logic for copying Windows dependencies into its own function and do some minor clean up, such as collecting all MSVC functionality into visual_studio.py. - Remove support for Visual Studio 2015 and Visual Studio 2017. This is a preparatory change in order to support Visual Studio 2022. * More cleanup of the code
* build: Only set PATH for GStreamer (#31078)Martin Robinson2024-01-173-53/+24
| | | | The documentation claims that this is the only environment variable that needs to be set before build.
* crown: Add a cargo config.toml file (#31090)Martin Robinson2024-01-151-6/+1
| | | | | This makes it more foolproof to install crown from inside the Servo directory, because the root Servo config.toml overrides the rustc to use crown (an obvious circular dependency).
* build: Don't add the `neon` feature for arm and aarch64 (#31075)Martin Robinson2024-01-121-6/+0
| | | | | | | | | | | | | | | This was enabled to allow using the simd / std::simd / packed-simd crate in the glyph cache [1][2]. Support for simd in the gfx crate was removed though [3], so this flag is not really doing anything -- and the Android build is currently broken. Plus, it's unclear what target features we can enable using stable Rust. We can explore adding neon support when Android is working again. This is part of a long-term effort to remove build complication and make it so that `cargo build` is equivalent to `./mach build`. 1. https://github.com/servo/servo/pull/10916 2. https://github.com/servo/servo/pull/10900 3. https://github.com/servo/servo/pull/24304
* build: Combine and simplify GStreamer shared object lists (#31038)Martin Robinson2024-01-092-66/+80
| | | | | | | | Add documentation and simplify the way that GStreamer shared objects lists are stored. In addition, move the list of extra GStreamer DLL dependencies to to the `gstreamer.py` file. The conditional plugin logic is no longer required as we are having already increased our GStreamer version requirements.
* Fix the build on Ubuntu 20.04 (#31019)Martin Robinson2024-01-076-45/+38
| | | | | | | | Ubuntu 20.04 doesn't have a new enough version of GStreamer, so automatically disable media when running on that platform. This also cleans up the media detection a bit, putting the result in a `enable-media` variable and moving some of the logic into the build scripts themselves rather than the platform module.
* bootstrap: Adding more output when installing dependencies (#31003)Martin Robinson2024-01-051-4/+4
| | | | | | | It's often the case (especially with the taplo installation and on Windows) that bootstrap is doing lots of stuff in the background for a long amount of time. Without output it's hard to tell what exactly is going on. This change adds more output to this process as well as removing some Pythong 2.x era code.
* Upgrade media / GStreamer / GLib (#30750)Martin Robinson2024-01-055-45/+34
| | | | | | | | | | | | | | | | | | - Upgrade the version of GStreamer for Windows This upgrades the Windows build to use the most recent version of GStreamer. This is necessary to upgrade our GStreamer dependency. - Stop shipping GStreamer binaries on Linux The binary bundle of GStreamer that we package is not used to compile -- only to run layout tests. It's too old for the APIs that we are using (as evidenced by needed 1.18 for WebRTC) and nowadays Linux distributions carry a new version so it's unecessary for our build machines. No longer using this binary bundle will allow us to upgrade our GStreamer dependency -- which now has stricter checks that we are using at least version 1.18. - Upgrade media to use newer versions of GStreamer / GLib dependencies
* Download Windows GStreamer dependencies from GitHub (#30973)Martin Robinson2024-01-031-1/+1
| | | | This works around issues where the server is rejecting our requests and should be more reliable.
* tidy: A few small improvements and fixes (#30941)Martin Robinson2024-01-021-12/+10
| | | | | | | | | | 1. Make the tidy output easier to follow 2. Integrate the WPT manifest cleanliness step into tidy itself and don't run it if nothing has changed in the WPT directory. 3. Fix an issue where Python test requirements were not installed, which could cause issues with some modules not being found. Fixes #30002.
* Integrate hyper_serde into Servo source (#30803)Martin Robinson2023-12-141-0/+1
| | | | | | | hyper_serde changes very infrequently and typically only in order to upgrade Servo dependencies. crates.io lists hyper_serde as having no dependents, and its integration will not prevent releasing new versions. Integrating it will both reduce the number of repositories we have to maintain as well as making it easier to upgrade Servo dependencies.
* Replace virtualenv with Python's built-in venv (#30377)Corey Farwell2023-12-072-5/+4
| | | | | | | | | | | | | | | | | | * Replace virtualenv with Python's built-in venv. * Apply Delan's suggestions and make a couple small fixes - Fix a tidy warning about directories that don't exist - Use shutil instead of the redundant get_exec_path - Miscellaneous cleanups * Fix typo in environment variable * fix bug where pip still tries to the wrong site-packages --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Delan Azabani <dazabani@igalia.com>
* Compile Servo with the latest version of rust stable (#30831)Martin Robinson2023-12-064-22/+8
| | | | | | | | | | | | | | | | This completes the transition to compiling Servo with rust stable. Some nightly-only features are still used when compiling the `script` and `crown` crates, as well as for some style unit tests. These will likely break with newer compiler versions, but `crown` can be disabled for them conditionally. This is just the first step. This has some caveats: 1. We need to disable setting up the special linker on Linux. The -Z option isn't supported with stable rust so using this is out -- meanwhile we can't be sure that lld is installed on most systems. 2. `cargo fmt` still uses some unstable options, so we need to rely on the unstable toolchain just for running `fmt`. The idea is to fix this gradually.
* Remove thinlto servobuild.config option (#30830)Martin Robinson2023-12-061-4/+0
| | | | | | | | | | | Rust uses a version of ThinLTO by default now [1]. This can be tweaked by adjusting rust compiler flags, which is probably a better way of controlling this than a custom servo configuration considering: 1. We want to remove the custom servo configuration eventually. 2. The -Z option that this configuration currently uses is unsupported by stable rust. 1. https://blog.rust-lang.org/inside-rust/2020/06/29/lto-improvements.html
* Replace script_plugins with a clippy like rustc driver (named crown) (#30508)Samson2023-12-012-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove script_plugins * Use crown instead of script_plugins * crown_is_not_used * Use crown in command base * bootstrap crown * tidy happy * disable sccache * Bring crown in tree * Install crown from tree * fix windows ci * fix warning * fix mac libscript_plugins.dylib is not available anymore * Update components/script/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> * Update for nightly-2023-03-18 Mostly just based off https://github.com/servo/servo/pull/30630 * Always install crown it's slow only when there is new version * Run crown test with `mach test-unit` * Small fixups; better trace_in_no_trace tests * Better doc * crown in config.toml * Fix tidy for real * no sccache on rustc_wrapper * document rustc overrides * fixup of compiletest * Make a few minor comment adjustments * Fix a typo in python/servo/platform/base.py Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com> * Proper test types * Ignore tidy on crown/tests --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* bootstrap: Alphabetize and add 'm4' Ubuntu dependency (#30727)Martin Robinson2023-11-131-9/+10
| | | It looks like `m4` is now required for builds on Debian-like systems.
* Add `--production` option to mach (#30707)Samson2023-11-102-5/+25
| | | | | | | | | | | * --prod(uction) mach argument * Use profile in workflows instead of production * Use profiles in unit tests * ups * Build (${{ inputs.profile }})
* Remove some stray references to OpenSSL (#30710)Martin Robinson2023-11-091-2/+0
| | | These were left over from the change to use rustls.
* Remove `__future__` imports that are no longer necessary (#30661)Martin Robinson2023-11-029-16/+1
| | | These are no longer necessary as we always use Python 3.
* Remove an unused file (#30662)Martin Robinson2023-11-011-21/+0
| | | This was probably used for the now removed homebrew package.
* Stop using distutils (#30638)Martin Robinson2023-10-281-2/+1
| | | | This is removed from Python 3.12 so we can no longer rely on it. All of this functionality is either in `setuptools` or `shutil`.
* Fix upload-nightly to use correct path (#30632)Mukilan Thiyagarajan2023-10-281-6/+6
| | | | Nightly builds now use production profile and thus will be available under target/production
* Enable debug assertions for all builds other than official releases (#30509)Delan Azabani2023-10-263-21/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Run main and try jobs with debug assertions * use single quotes in workflow expressions * set force-debug-assertions in main.yml * set force-debug-assertions as part of decision job * fix typo in MachCommands.build * fix more hardcoded profile names * fix tidy * split cargo_profile_option on windows * Fix running servoshell and unit tests through a symlink * rename steps to make them less confusing * fix more hardcoded cargo profile options * fix missing inputs in linux-wpt and mac-wpt * make filename an inherent method of Resource * rework release-with-debug-assertions profile to production profile * rework resource logic to eliminate std_test_override * set production flag in nightly release builds * clean up servobuild.example and windows.yml * oops forgot to check in embedder_traits/build.rs * fix mach test-unit behaviour through symlink * unit tests only need current_dir and ancestors * fix macOS package smoketest breakage * expect css/css-color/currentcolor-003 to crash under layout 2013 * fix more references to {force,release-with}-debug-assertions * fix local build failures under --profile production
* Add support for EndeavourOS (#30513)bc-universe2023-10-061-0/+1
|
* Bootstrap pkg-config and cmake on MacOS (#30497)Martin Robinson2023-10-051-1/+13
| | | | | | | These need to be installed in order to build so we can install them via Homebrew. Do this by simply restoring the Homebrew bootstrapping logic we had in place previously. Fixes #27171.
* Adjust the missing taplo message (#30473)Martin Robinson2023-10-031-3/+1
| | | | The current message doesn't have a line break where you would expect it to and instead has a gap due to the indentation of the code in Python.
* Update WebGPU CTS (#30454)Samson2023-09-301-0/+2
| | | | | | | * Fix webgpu-cts import script * Update webgpu-cts to https://github.com/gpuweb/cts/commit/f2b59e03621238d0d0fd6305be2c406ce3e45ac2 * Updated expectations
* fix WebGPU runtime dependencies on linux (#30407)Delan Azabani2023-09-221-4/+24
|
* Enforce formatting of TOML files (#30128)Samson2023-09-192-3/+35
| | | | | | | | | * Fmt all toml files * bootstrap taplo * enforce toml formatting with taplo * Install taplo in CI using cargo-install action
* Add TUXEDO OS to mach bootstrap (#30363)Carlos Bentzen2023-09-151-1/+1
| | | Signed-off-by: Carlos Bentzen <cadubentzen@gmail.com>
* Use MozTools 4 and update mozjs (#30326)Samson2023-09-112-5/+5
| | | | | | | | | | | | | | | | | | | * Update mozjs * moztools4 in bootstrap * no autoconf * tidy * switch to servo-build-deps * update mozjs for real * glue mozjs * fmt * move to servo/mozjs
* No extern crate test/tidy & better RUSTFLAGS handling in mach (#30328)Samson2023-09-101-4/+5
| | | | | | | | | | | * Remove unused extern crate rustflag * Remove tidy check alphabetical order of extern crates rustfmt's reorder_imports already does that * fix * better RUSTFLAGS handling
* Move user input logic into servoshell (#30238)Atbrakhi2023-09-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cleanup and move user input logix into servoshell * fix fmt * moves test from servoshell file * move command-line args into servoshell * remove feature media-gstreamer * fix fmt * move user input logic code into lib to make it more testable * remove opts_matches in fn instead get it from main2 * remove pub and fix import * add licence in new file * revert passing Matches, instead pass Option String * review update, also move sanitize fn to parser file * fmt fix * review fix: remove extra line
* Update mozjs and use moztools infra (#30292)Samson2023-09-051-5/+0
|
* Let WPT commands take the --legacy-layout argument (#30239)Martin Robinson2023-08-301-1/+0
| | | This also prints a better message when starting tests.
* Always dummy (#30240)Samson2023-08-301-5/+5
|
* Rename ports/winit package to servoshell (#30163)Atbrakhi2023-08-281-1/+1
| | | | | * rename winit package to servoshell * revert previous changes and rename only package
* Add Raspbian GNU/Linux distro for mach bootstrap (#30223)Manuel Rego Casasnovas2023-08-281-1/+2
|
* Get LLVM from chocolatey (#30140)Martin Robinson2023-08-212-7/+3
| | | | | | | | | | | | LLVM is the largest package that we get from servo-build-deps, so installing it via chocolatey should reduce the amount of data that we transfer from that source. In addition, it's one less dependency that we have to manage. It also seems that installing LLVM to the default location with choco means that we no longer have to set the LIBCLANG_PATH environment variable for bindgen. Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Upgrade whole webgpu stack (#29795)Samson2023-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Allow noidl files in script/dom/webidls * Upgrade wgpu to 0.16 and refresh whole webgpu implementation * Update WebGPU test expectations * misc * MutNullableDom -> DomRefCell<Option<Dom for GPUTexture * Direct use of GPUTextureDescriptor * Remove config from GPUCanvasContext * misc * finally blue color * gpubuffer "handle" error * GPU object have non-null label * gpu limits and info * use buffer_size * fix warnings * Cleanup * device destroy * fallback adapter * mach update-webgpu write webgpu commit hash in file * Mising deps in CI for webgpu tests * Updated expectations * Fixups * early reject * DomRefCell<Option<Dom -> MutNullableDom for GPUTexture
* Use system lld on NixOS instead of rust-lld (#30123)Mukilan Thiyagarajan2023-08-183-2/+16
| | | | | | | | | | | | | | | | The -Zgcc-ld=lld flag makes rust use the rust-lld linker that is distributed as part of rust toolchain. However, this flag doesn't work on nixos correctly as 1) rust-lld needs to be patched to have the correct rpath to find libz.so 2) the bin/gcc-ld/ld.lld wrapper which calls rust-lld also needs to be patched to use the correct dynamic loader 3) rust-lld doesn't respect NIX_LDFLAGS which contains the additional search path derived from buildInputs. The system linkers on nixos are wrapped so that NIX_LDFLAGS is added as the rpath to the final binary. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Clean up the environment variables set for mozjs (#30106)Martin Robinson2023-08-161-23/+8
| | | | mozjs from the repository now has a simplified interface for setting these.
* Replace "-mmacosx-version-min" with MACOSX_DEPLOYMENT_TARGET (#30102)Martin Robinson2023-08-151-6/+1
| | | | | | | | It's unclear if the compiler flag was doing anything, but I've verified (with otool) that the environment variable does affect the minimum version of the MacOS set in the binary. We could examine later if this is still necessary. This was added in #23163 when switching CI from gcc to clang.
* Remove gold config option and use lld on Linux (#30100)Martin Robinson2023-08-151-3/+5
| | | | | | | | | | | | | | | | There are a few motivations for this change: 1. lld is demonstrably faster than gold, but is really only stable on Linux at the moment. There's a good chance that it will be ready for all platforms soon though. 2. Most people do not have gold installed on MacOS and Windows. You'd have to do this manually through homebrew. I think it's a safe assumption that this probably won't be slowing things down much on those platforms. 3. We need to remove all configuration of the build that happens while running `./mach build` if we ever hope to make `cargo build` equivalent to the mach build. This unlocks static configuration of the rustflags. One of the big blockers for proper `cargo build` support.
* Make `native-bluetooth` a default feature (#30097)Martin Robinson2023-08-141-2/+0
| | | This features is turned on unconditionally by `./mach build`.
* Make the `--release`/`--dev` more consistent and less surprising (#30091)Martin Robinson2023-08-146-318/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were some issues with the way that the `--release` and `--dev` arguments were handled in mach commands. - Not all commands accepted them in the same way. For instance `./mach test-wpt` didn't really accept them at all. - If you did not pass either of them, mach would try to guess which build you meant. This guess was often quite surprising as it wasn't printed and it depended on the state of the your target directory, which is difficult to remember. - The `dev` profile is colloquially called a "debug" profile and some commands accepted `-d` or `--debug...` like arguments, but `--debug` with `./mach run` meant run in a debugger. It was easy to mix this up. This change: - Centralizes where build type argument processing happens. Now it the same shared decorator in CommandBase. - Uses a `BuildType` enum instead of passing around two different booleans. This reduces the error checking for situations where both are true. - Be much less clever about guessing what build to use. Now if you don't specify a build type, `--dev` is chosen. I think this behavior matches cargo. - Makes it so that `./mach test-wpt` accepts the exact same arguments and has the same behavior as other commands. In addition, the suite correct for `test-wpt` is removed. There are only two suites now and it's quite unlikely that people will confuse WPT tests for rust unit tests.
* Support mac wpt builds (#29867)Samson2023-08-111-1/+11
| | | | | | | * Add wpt-mac builds * Fix wpt reporting check run tag * There can only be five concurrent mac runners
* Switch to rustls and webpki-roots (#30025)Martin Robinson2023-08-084-42/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change replaces OpenSSL with rustls and also the manually curated CA certs file with webpki-roots (effectively the same thing, but as a crate). Generally speaking the design of the network stack is the same. Changes: - Code around certificate overrides needed to be refactored to work with rustls so the various thread-safe list of certificates is refactored into `CertificateErrorOverrideManager` - hyper-rustls takes care of setting ALPN protocols for HTTP requests, so for WebSockets this is moved to the WebSocket code. - The safe set of cypher suites is chosen, which seem to correspond to the "Modern" configuration from [1]. This can be adjusted later. - Instead of passing a string of PEM CA certificates around, an enum is used that includes parsed Certificates (or the default which reads them from webpki-roots). - Code for starting up an SSL server for testing is cleaned up a little, due to the fact that the certificates need to be overriden explicitly now. This is due to the fact that the `webpki` crate is more stringent with self-signed certificates than SSL (CA certificates cannot used as end-entity certificates). [2] 1. https://wiki.mozilla.org/Security/Server_Side_TLS 2. https://github.com/briansmith/webpki/issues/114 Fixes #7888. Fixes #13749. Fixes #26835. Fixes #29291.
* Fix the docs build (#30058)Martin Robinson2023-08-022-6/+8
| | | | | | Type inference was incorrectly inferring that our `check_output()` helper was returning `str` when in reality, it returns `bytes`. This fixes the caller that was no longer decoding those bytes and fixes the type annotation on the function.