sentry-electron icon indicating copy to clipboard operation
sentry-electron copied to clipboard

Why does the `sentry-symbols.js` script need to be generated and checked into the repo?

Open mnquintana opened this issue 4 years ago • 0 comments

👋🏽 I've been working through setting up a pre-existing Electron project to work with @sentry/electron, and have some feedback about the wizard / setup process:

  • Why does the sentry-symbols.js script the Wizard generates for uploading Electron debug symbols to Sentry need to be generated and checked into the repo at all?

I took a look at the script source, and it doesn't seem like there's anything in it that would necessitate being added to your project's source like this – if it's for customizability (e.g. editing the script after the fact to remove platforms), could that be parameterized instead?

For example, if you only wanted to upload symbols for Mac & Windows, but not Linux, you could do something like:

npx sentry-symbols --platform=win32,darwin

(Just as an example of an imaginary CLI for this script, where sentry-symbols is a new CLI bin)

Expected

Sentry includes a CLI command that runs a parameterized version of this sentry-symbols.js script internally, abstracting away script internals and removing the need to check ~2 new files and 2 new dependencies into your project's source code.

Actual

sentry-symbols.js must be generated by the Wizard and added to the project's source files, and you must add 2 dependencies yourself manually to your project's package.json (@sentry/cli and electron-download).

Happy to provide any other information / elaborate on my use case if it'd be helpful! 🙇🏽

mnquintana avatar Sep 28 '21 19:09 mnquintana