servo / servo/mozjs

Spurious rebuilds (still…)

Open
#249 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
359
Forks
153
Avg merge
2d 10h
Merged PRs (30d)
8

Description

In https://github.com/servo/mozjs/pull/246 I tried to fix this and it seemed ok when building from this repository. But somehow building in Servo even after https://github.com/servo/servo/pull/26294 still has this bug:

$ ./mach build
[…]
$ CARGO_LOG=cargo::core::compiler::fingerprint=info ./mach build 
[2020-04-24T09:05:50Z INFO  cargo::core::compiler::fingerprint] stale: changed "/home/simon/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/9a6d8fc/mozjs/js/src/old-configure"
[2020-04-24T09:05:50Z INFO  cargo::core::compiler::fingerprint]           (vs) "/home/simon/servo/target/release/build/mozjs_sys-b4b5f9376eb52130/output"
[2020-04-24T09:05:50Z INFO  cargo::core::compiler::fingerprint]                FileTime { seconds: 1587715054, nanos: 830819920 } != FileTime { seconds: 1587715054, nanos: 862820022 }
[2020-04-24T09:05:50Z INFO  cargo::core::compiler::fingerprint] fingerprint error for servo v0.0.1 (/home/simon/servo/ports/glutin)/Build/Target { name: "servo", tested: false, benched: false, doc: true, ..: with_path("/home/simon/servo/ports/glutin/main.rs", Edition2018) }
[2020-04-24T09:05:50Z INFO  cargo::core::compiler::fingerprint]     err: current filesystem status shows we're outdated
[2020-04-24T09:05:50Z INFO  cargo::core::compiler::fingerprint] fingerprint error for libservo v0.0.1 (/home/simon/servo/components/servo)/Build/Target { ..: lib_target("servo", ["rlib"], "/home/simon/servo/components/servo/lib.rs", Edition2018) }
[2020-04-24T09:05:50Z INFO  cargo::core::compiler::fingerprint]     err: current filesystem status shows we're outdated
[2020-04-24T09:05:50Z INFO  cargo::core::compiler::fingerprint] fingerprint error for layout_thread_2020 v0.0.1 (/home/simon/servo/components/layout_thread_2020)/Build/Target { ..: lib_target("layout_thread", ["lib"], "/home/simon/servo/components/layout_thread_2020/lib.rs", Edition2018) }
[2020-04-24T09:05:50Z INFO  cargo::core::compiler::fingerprint]     err: current filesystem status shows we're outdated
[2020-04-24T09:05:50Z INFO  cargo::core::compiler::fingerprint] fingerprint error for script v0.0.1 (/home/simon/servo/components/script)/Build/Target { ..: lib_target("script", ["lib"], "/home/simon/servo/components/script/lib.rs", Edition2018) }
[2020-04-24T09:05:50Z INFO  cargo::core::compiler::fingerprint]     err: current filesystem status shows we're outdated
[2020-04-24T09:05:50Z INFO  cargo::core::compiler::fingerprint] fingerprint error for mozjs v0.13.0 (https://github.com/servo/rust-mozjs#8615f863)/Build/Target { doctest: false, ..: lib_target("mozjs", ["lib"], "/home/simon/.cargo/git/checkouts/rust-mozjs-8611526964119dd6/8615f86/src/lib.rs", Edition2015) }
[2020-04-24T09:05:50Z INFO  cargo::core::compiler::fingerprint]     err: current filesystem status shows we're outdated
[2020-04-24T09:05:50Z INFO  cargo::core::compiler::fingerprint] fingerprint error for mozjs v0.13.0 (https://github.com/servo/rust-mozjs#8615f863)/RunCustomBuild/Target { ..: custom_build_target("build-script-build", "/home/simon/.cargo/git/checkouts/rust-mozjs-8611526964119dd6/8615f86/build.rs", Edition2015) }
[2020-04-24T09:05:50Z INFO  cargo::core::compiler::fingerprint]     err: current filesystem status shows we're outdated
[2020-04-24T09:05:50Z INFO  cargo::core::compiler::fingerprint] fingerprint error for mozjs_sys v0.68.1 (https://github.com/servo/mozjs?rev=9a6d8fc6b0cf13cd02efbd805ccdf62ddc5ce593#9a6d8fc6)/RunCustomBuild/Target { ..: custom_build_target("build-script-build", "/home/simon/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/9a6d8fc/build.rs", Edition2015) }
[2020-04-24T09:05:50Z INFO  cargo::core::compiler::fingerprint]     err: current filesystem status shows we're outdated
[2020-04-24T09:05:50Z INFO  cargo::core::compiler::fingerprint] fingerprint error for mozjs_sys v0.68.1 (https://github.com/servo/mozjs?rev=9a6d8fc6b0cf13cd02efbd805ccdf62ddc5ce593#9a6d8fc6)/Build/Target { doctest: false, ..: lib_target("mozjs_sys", ["lib"], "/home/simon/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/9a6d8fc/src/lib.rs", Edition2015) }
[2020-04-24T09:05:50Z INFO  cargo::core::compiler::fingerprint]     err: current filesystem status shows we're outdated
   Compiling mozjs_sys v0.68.1 (https://github.com/servo/mozjs?rev=9a6d8fc6b0cf13cd02efbd805ccdf62ddc5ce593#9a6d8fc6)
   Compiling mozjs v0.13.0 (https://github.com/servo/rust-mozjs#8615f863)
   Compiling script v0.0.1 (/home/simon/servo/components/script)
   Compiling layout_thread_2020 v0.0.1 (/home/simon/servo/components/layout_thread_2020)
   Compiling libservo v0.0.1 (/home/simon/servo/components/servo)
   Compiling servo v0.0.1 (/home/simon/servo/ports/glutin)

Relevant part:

stale: changed "/home/simon/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/9a6d8fc/mozjs/js/src/old-configure"

I don’t feel like investigating and making a fix right now, so here’s a bug report instead.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with ./mach build and the Cargo fingerprint logging shown in the report. Start by checking why mozjs/js/src/old-configure is reported newer than the build output, then trace the related build.rs entries for mozjs_sys and mozjs. Done means an unchanged Servo build no longer recompiles these targets spuriously.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.