Skip to content

Manually version browsers #74

@dgp1130

Description

@dgp1130

@io_bazel_rules_webtesting doesn't appear to be maintained anymore and hasn't see a release in over 2 years. This means the version of downloaded browsers is falling out of date.

It wouldn't be that big a deal, except that I've been using <template shadowroot="open"> because that is what's supported in the version of Chrome used for testing. However, the spec was changed to use <template shadowrootmode="open"> and Chrome M119 is slated to remove support for <template shadowroot="open">. This is currently scheduled for Nov 7th, per https://chromiumdash.appspot.com/schedule.

As a result, I need to update my code to use shadowrootmode, which means I need a recent-enough browser version which supports that. I'm wondering if I can fork or build a simpler solution good enough for @rules_prerender. This is definitely blocking 1.0.0 because I wouldn't want to ship that until I can use shadowrootmode correctly.

I have a prototype in ref/browser-update forked from an implementation in the Angular Dev Infra repository. This was sufficient to download recent versions of Chrome / Firefox and get a passing test with shadowrootmode on Chrome.

Some more things I'll need to figure out:

  • Firefox - Doesn't seem to be starting correctly in WSL right now. I would love to do better cross-browser testing, but Firefox doesn't support declarative shadow DOM right now, which is a big part of @rules_prerender. It might be fine since I have the polyfill, and could serve as a test case for that. But we may want to think about how much value this is actually giving and whether or not its worth it.
  • Debugging - I'm struggling to start headful (?) Chrome to debug a test like I've done in the past. Might take some trial and error to figure that out.
  • Test everything - New Chrome browser should be enabled everywhere in the repository.
  • Updating browsers - There's a script in Angular Dev Infra for updating browser version automatically which would be useful to fork as well.
  • Refactor - I kept the existing directory structure and formatting conventions which definitely clashes with @rules_prerender. I'll want to refactor things to make it more maintainable and aligned with the rest of the codebase.
  • Migrate to shadowrootmode - Once everything is stable, I should be able to migrate all usages of shadowroot to shadowrootmode.
  • Break @io_bazel_rules_webtesting dependency - If possible, I should also look into breaking the dependency on @io_bazel_rules_webtesting entirely. Unfortunately the Angular implementation does still rely on a few exported symbols from that ruleset, even if it versions its own browsers. It would be great to drop that dependency altogether.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cleanupInternal cleanup of infrastructure

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions