Skip to content

Investigate eliminating the React fork repo (abanoubghadban/react) #31

@AbanoubGhadban

Description

@AbanoubGhadban

Problem

Currently, upgrading react-server-dom-webpack requires maintaining two separate repositories:

  1. shakacode/react_on_rails_rsc (this repo) — ships the RSC npm package with built artifacts in src/react-server-dom-webpack/
  2. abanoubghadban/react (a fork of facebook/react) — hosts rsc-patches/v<version> branches containing [RSC-PATCH] commits on top of upstream React tags

The fork repo exists solely to park a small set of patch commits on top of vanilla React, build the patched react-server-dom-webpack package, and copy the output into this repo.

Pain Points

  • Two repos to maintain — contributors need access to both; cross-repo changes require two commits, two push cycles
  • Disconnected history — patches in the fork are invisible from this repo's PR/review flow
  • CI complexity — any automated upgrade or validation needs credentials and clone access to the fork
  • Fork staleness — the fork accumulates upstream drift and must be periodically rebased

Goal

Investigate options to consolidate everything into shakacode/react_on_rails_rsc so that abanoubghadban/react can be archived or deleted.

Options Identified

  1. Git submodule — embed the fork as vendor/react/
  2. Git subtree — merge fork history into this repo
  3. On-demand clone — auto-clone the fork at upgrade time (script-managed, gitignored)
  4. Patch files — store [RSC-PATCH] commits as .patch files in this repo; build from vanilla facebook/react at upgrade time

See the investigation doc in the associated PR for detailed analysis of each option.

Decision

After analysis, Option 4 (patch files) was selected as the approach to implement. This will be implemented in a follow-up issue after the currently open PRs are merged.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions