Skip to content

esbuild plugin's debug ID generation is not deterministic #500

@Cldfire

Description

@Cldfire

I am porting an internal web extension build system from Webpack to esbuild. Since we publish our web extension on addons.mozilla.org, we are required to provide the full source code for our extension in a manner that a Mozilla contractor can use to perform a from-scratch build that will byte-for-byte match the release artifact built from our CI environment.

The Sentry Webpack plugin uses the chunk hash as the input for the debug ID snippet generation function, resulting in the same debug ID for the same build inputs:

const debugId = arg?.chunk?.hash ? stringToUUID(arg.chunk.hash) : uuidv4();
return getDebugIdSnippet(debugId);

The Sentry esbuild plugin, however, uses a unique UUID as the input, resulting in a different debug ID for the same build inputs:

contents: getDebugIdSnippet(uuidv4()),

This breaks the determinism of our web extension build as the resulting build outputs have different debug IDs embedded within them.

I'd like to request that the esbuild plugin produce deterministic debug IDs based on the build inputs.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions