Skip to content

Assess Shadow-based simplification against ReForged's remap and classloader architecture#6

Closed
Copilot wants to merge 1 commit intomasterfrom
copilot/evaluate-redundant-content
Closed

Assess Shadow-based simplification against ReForged's remap and classloader architecture#6
Copilot wants to merge 1 commit intomasterfrom
copilot/evaluate-redundant-content

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 11, 2026

This change addresses the question of whether ReForged can be meaningfully simplified with Shadow/shading. The conclusion is that Shadow is not a viable replacement for the core compatibility path; the project depends on runtime remapping, shim classes, event bridging, and classloader identity control.

  • Scope

    • Review the current compatibility architecture rather than changing runtime behavior.
    • Separate dependency-packaging concerns from API/behavior bridging concerns.
  • What this establishes

    • ReForged’s core path is:
      • ASM bytecode remap
      • net.neoforged.* shim surface
      • Forge/NeoForge event bus bridging
      • parent-first classloading for type identity
    • Shadow/relocation can help only with isolated embedded utility dependencies.
    • Shadow cannot replace:
      • NeoForge → Forge API remapping
      • wrapper-constructor event bridging
      • parent-first class identity guarantees
      • mixin-driven compatibility patches
  • Why Shadow is the wrong abstraction here

    • Shadow solves packaging and namespace collision problems.
    • ReForged’s main problems are semantic translation and runtime type identity.
    • Replacing net.neoforged.* references with relocated classes would still leave the compatibility behavior unresolved.
  • Follow-up direction

    • If simplification is needed, the higher-value targets are:
      • shared helper extraction across NeoForgeEventBusAdapter and NeoForgeEventBusShim
      • breaking up oversized hook/coordinator classes
      • keeping Shadow limited to narrow third-party implementation dependencies, if introduced later
private static final String[] PARENT_FIRST_PREFIXES = {
    "java.", "jdk.", "sun.", "javax.",
    "net.minecraft.", "com.mojang.",
    "net.minecraftforge.", "net.neoforged.",
    "org.xiyu.reforged."
};

This is the critical constraint: the project is preserving cross-loader type identity at runtime, which is outside the scope of what Shadow/relocation can simplify.

Original prompt

评价一下该仓库的石山
重复类内容等石山


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI changed the title [WIP] Evaluate redundant content in the repository Assess technical debt hotspots and intentional duplication in the NeoForge compatibility layer Mar 11, 2026
Copilot AI changed the title Assess technical debt hotspots and intentional duplication in the NeoForge compatibility layer Assess Shadow-based simplification against ReForged's remap and classloader architecture Mar 11, 2026
@Mai-xiyu Mai-xiyu closed this Mar 11, 2026
@Mai-xiyu Mai-xiyu deleted the copilot/evaluate-redundant-content branch March 14, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants