Skip to content

Make native CSS runtime tests portable to MSVC #846

Description

@wieslawsoltes

Problem

The exact Windows native-runtime build reaches two deterministic portability errors after the preceding compiler stack:

  • MSVC C2026 at native_v8_runtime_browser_dom_tests.inc: the stylesheet mutation setup is one oversized raw string literal;
  • native_css_url_escape_oracle_tests.cpp includes <sys/resource.h> unconditionally, although RSS sampling is already optional on unsupported platforms.

The same run also showed one isolated Cannot open compiler generated file: Invalid argument for a small graphics contract target. The generated object path is 263 characters in the full parser/snapshot/graphics build variant, exceeding the classic Windows path boundary.

Fix

  • partition the stylesheet mutation JavaScript source into bounded raw literal chunks joined at runtime;
  • include and call getrusage only on Apple/Linux and return zero for unsupported peak-RSS sampling;
  • shorten only the internal CMake target name while preserving its public CTest name and labels;
  • keep script text, performance gates, and runtime behavior unchanged.

Acceptance

The exact win-x64 runtime target compiles past both files. Linux/macOS retain their RSS gates. The external-image contract target builds with an object path below 260 characters while its public test identity remains unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingvscode-oss/mergedMerged for the AppScene/WebScene VS Code OSS integration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions