Skip to content

Prefer oldspcomp for SourceMod 1.13 builds where spcomp is SourcePawn 2 - #41

Closed
rumblefrog with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-sourcepawn-compatibility
Closed

Prefer oldspcomp for SourceMod 1.13 builds where spcomp is SourcePawn 2#41
rumblefrog with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-sourcepawn-compatibility

Conversation

Copilot AI commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

SourceMod 1.13.0.7442 is the last pure SP 1.13 compiler build; from 1.13.0.7451 onward, spcomp tracks SourcePawn 2 and breaks legacy code paths (notably VFormat). This change ensures setup-sp selects the SP1-compatible compiler for those builds.

  • Version-gated compiler swap (src/installer.ts)

    • Added a targeted gate for 1.13.* with build >= 7451.
    • For matching versions, swaps:
      • oldspcomp -> spcomp
      • oldspcomp64 -> spcomp64
    • Non-matching versions keep existing behavior.
  • Preserve SourcePawn 2 compiler binaries

    • Before swap, current compilers are retained as:
      • spcomp_sourcepawn2
      • spcomp64_sourcepawn2
    • Swap is conditional on both old/current binaries existing to avoid unsafe renames.
  • Bundled action output update

    • Regenerated lib/index.js to include the installer logic change.
function isSourceMod113Build7451OrLater(version: string): boolean {
  const [major, minor, build] = version.split('.').map(Number);
  return major === 1 && minor === 13 && build >= 7451;
}

Co-authored-by: rumblefrog <6960234+rumblefrog@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix SourcePawn compatibility for spcomp in builds past 7442 Prefer oldspcomp for SourceMod 1.13 builds where spcomp is SourcePawn 2 Sep 3, 2026
Copilot AI requested a review from rumblefrog September 3, 2026 01:39
@rumblefrog

Copy link
Copy Markdown
Owner

Closing in favor of #44

@rumblefrog rumblefrog closed this Sep 6, 2026
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.

SM 1.13 compiler builds past 7442 are SourcePawn 2

2 participants