Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(source packaging): allow custom output path in task #691

Conversation

razielgn
Copy link
Contributor

This fixes packaging an app's source code for Sentry v10 when building in highly reproducible environments (like nix), where the deps' sources are read-only (i.e. cannot write to Sentry's priv dir).
I've added an example to the docs.

Copy link
Collaborator

@whatyouhide whatyouhide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue with this is that the priv/sentry.map path is not public API. So, if allow users to change the output of the map, we should also allow them to load the map from a different path. So, let's also add a config option for this, called :source_code_map_path. When not present, we default to the current priv/sentry.map.

test/mix/sentry.package_source_code_test.exs Outdated Show resolved Hide resolved
lib/mix/tasks/sentry.package_source_code.ex Outdated Show resolved Hide resolved
@razielgn razielgn force-pushed the allow-override-of-package-source-code-task-output branch from 58a6102 to 7bd03ab Compare February 12, 2024 14:18
@razielgn
Copy link
Contributor Author

Thank you for the tips, I've updated the PR. I hope I added Config.source_code_map_path() in the right place.

@whatyouhide whatyouhide merged commit 4f111f6 into getsentry:master Feb 24, 2024
3 checks passed
@whatyouhide
Copy link
Collaborator

Thanks @razielgn! 💟

@razielgn razielgn deleted the allow-override-of-package-source-code-task-output branch February 24, 2024 12:21
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.

None yet

2 participants