Skip to content

Merging PRs consecutively requires rebuild due to dist/index.js.map #271

Description

@djkees

When two PRs are merged back to back, every other open PR touching dist/ needs a manual rebase + rebuild + force-push, because dist/index.js.map conflicts (hit #260, #262, #267). Would you be open to dropping the source map from dist/? I can open a PR if so.

  • Cause: the map's mappings field is one line of opaque JSON, so git can't merge two rebuilds of it. It was the only conflicting file in every case so far (re-checked on test(windows): cover sequential ifx/gfortran installs #262 and Add retry to installer downloads/installs that had none #274; dist/index.js auto-merged).
  • Change: remove --source-map from the build script and delete dist/index.js.map and dist/sourcemap-register.js. verify dist needs no change.
  • Cost: crash stack traces point at lines in dist/index.js instead of the source files (function names are preserved). The map can still be regenerated from any tag by building with --source-map, though note ncc's maps are already only approximate (a few lines off), since they map to transpiled source. 9 of 11 popular actions I checked (checkout, setup-node, setup-python, setup-go, ...) don't commit a map either.
  • Not a full fix: dist/index.js itself can still conflict when PRs touch nearby code. If that becomes a problem, one option is to rebuild and commit dist/ from a workflow after each merge to develop, so PRs only need to carry source changes. That's a bigger change, so I'd only raise it if you want it.

Activity

  1. added
    v2About the work-in-progress composite action -> TypeScript rewrite
    on Sep 21, 2026
  2. minhqdao commented on Oct 9, 2026

    @minhqdao
    Contributor

    Closing as #279 resolved the source map conflicts.

    As noted, dist/index.js can still cause merge conflicts. We intentionally keep the bundled output committed, following GitHub's recommended practice for JavaScript Actions, so the executable code is included alongside the source.

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

    v2About the work-in-progress composite action -> TypeScript rewrite

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions