Skip to content

compiler: preserve resolved package-instance identity in the full OpenCode dependency graph #8516

Closed

Description

@proggeramlug

Parent: #8506
Related prior decision: #7197

Problem

Perry currently compiles one copy per package name. The full OpenCode install contains legitimate nested versions, and direct source compilation reports silent Node-resolution divergences, including:

  • minimatch 10.0.3 vs 10.2.5
  • semver 7.8.5 vs 7.8.1
  • @standard-schema/spec 1.0.0 vs 1.1.0
  • @ai-sdk/provider 3.0.8 vs 3.0.10
  • @ai-sdk/provider-utils 4.0.23 vs 4.0.27
  • which 2.0.2 vs 6.0.1
  • entities 4.5.0 vs 7.0.1
  • zod 4.1.8 vs 4.4.3
  • path-key 3.1.1 vs 4.0.0

Selecting one package globally is observably different from Node/Bun resolution and can silently bind incompatible APIs.

Required direction

Module/package identity must include the resolved package root/instance, not only the package name. Deduplicate only when two imports resolve to the same physical/logical package instance. Native shim routing must remain explicit and must not collapse unrelated installed versions.

Acceptance

  • a nested two-version fixture matches Node's importer-relative resolution
  • the full OpenCode collection emits no one-copy-per-package-name warnings
  • each importing package binds the version its normal Node/Bun resolution selects
  • compile caching and native-package allowlists remain deterministic

Activity

  1. added
    bugConfirmed defect or regression
    parityCompatibility gap with Node.js, ECMAScript, or the supported ecosystem
    on Aug 21, 2026
  2. added 2 commits that reference this issue on Aug 21, 2026
    4e8aa19
    6950b42
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

    bugConfirmed defect or regressionparityCompatibility gap with Node.js, ECMAScript, or the supported ecosystem

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions