Skip to content

main is busted with --debug-mozjs / MOZJS_FROM_SOURCE=1 #38311

@delan

Description

@delan

it looks like #38284 bumped the mozjs-sys source dependency from 128e1e230a015 to 9c017973a4bf9 (diff), but only bumped the artifact dependency from v0.128.13-0 (128e1e230a015) to v0.128.13-1 (b14aebff23ac4).

but since ace07c828648a includes breaking changes in mozjs-sys, main is now busted if we build mozjs-sys from source. this divergence also seems to be why we can’t land #38232: it depends on the new mozjs-sys and addresses the breaking changes, but we build with the outdated mozjs-sys artifacts in CI.

busted as of 93d234d:

➜  servo git:(main) ✗ MOZJS_FROM_SOURCE=1 ./mach build
No build type specified so assuming `--dev`.
Building `debug` build with crown disabled (no JS garbage collection linting).
   Compiling mozjs_sys v0.128.13-1 (https://github.com/servo/mozjs#9c017973)
   Compiling mozjs v0.14.1 (https://github.com/servo/mozjs#9c017973)
   Compiling script_bindings v0.0.1 (/Users/atbrakhi/Documents/codespace/servo/components/script_bindings)
   Compiling script v0.0.1 (/Users/atbrakhi/Documents/codespace/servo/components/script)
error[E0063]: missing fields `dropInterruptQueues`, `popInterruptQueue` and `pushNewInterruptQueue` in initializer of `JobQueueTraps`
  --> components/script/script_runtime.rs:87:41
   |
87 | static JOB_QUEUE_TRAPS: JobQueueTraps = JobQueueTraps {
   |                                         ^^^^^^^^^^^^^ missing `dropInterruptQueues`, `popInterruptQueue` and `pushNewInterruptQueue`

error[E0061]: this function takes 3 arguments but 2 arguments were supplied
    --> components/script/script_runtime.rs:584:25
     |
584  |           let job_queue = CreateJobQueue(
     |  _________________________^^^^^^^^^^^^^^-
585  | |             &JOB_QUEUE_TRAPS,
586  | |             &*microtask_queue as *const _ as *const c_void,
587  | |         );
     | |_________- argument #3 of type `*mut c_void` is missing
     |
note: function defined here
    --> /Users/atbrakhi/Documents/codespace/servo/target/debug/build/mozjs_sys-0806f33ec0b889c8/out/build/gluebindings.rs:1192:16
     |
1192 |         pub fn CreateJobQueue(
     |                ^^^^^^^^^^^^^^
help: provide the argument
     |
584  |         let job_queue = CreateJobQueue(&JOB_QUEUE_TRAPS, &*microtask_queue as *const _ as *const c_void, /* *mut c_void */);
     |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Some errors have detailed explanations: E0061, E0063.
For more information about an error, try `rustc --explain E0061`.
error: could not compile `script` (lib) due to 2 previous errors
      Timing report saved to /Users/atbrakhi/Documents/codespace/servo/target/cargo-timings/cargo-timing-20250728T074340Z.html
Failed in 0:01:36

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions