Throw error when setting non-serializable macro config#1083
Merged
ef4 merged 1 commit intoembroider-build:mainfrom Jan 25, 2022
Merged
Throw error when setting non-serializable macro config#1083ef4 merged 1 commit intoembroider-build:mainfrom
ef4 merged 1 commit intoembroider-build:mainfrom
Conversation
Contributor
|
Thanks, this looks good. |
3 tasks
mydea
added a commit
to getsentry/sentry-javascript
that referenced
this pull request
Oct 24, 2022
When defining Sentry config in `ENV['@sentry/ember'].sentry`, this goes through @embroider/macros under the hood. This relies on config being serializable, which means that e.g. you cannot use regex in the config. To make this easier to pin down (as the error message can be a bit cryptic), this now validates the passed config (based on embroider-build/embroider#1083) and shows a helpful warning message. Note that this also moved this around a bit, leading to config being written only once on build, which should be a bit faster.
mydea
added a commit
to getsentry/sentry-javascript
that referenced
this pull request
Oct 27, 2022
When defining Sentry config in `ENV['@sentry/ember'].sentry`, this goes through @embroider/macros under the hood. This relies on config being serializable, which means that e.g. you cannot use regex in the config. To make this easier to pin down (as the error message can be a bit cryptic), this now validates the passed config (based on embroider-build/embroider#1083) and shows a helpful warning message. Note that this also moved this around a bit, leading to config being written only once on build, which should be a bit faster.
mydea
added a commit
to getsentry/sentry-javascript
that referenced
this pull request
Oct 28, 2022
When defining Sentry config in `ENV['@sentry/ember'].sentry`, this goes through @embroider/macros under the hood. This relies on config being serializable, which means that e.g. you cannot use regex in the config. To make this easier to pin down (as the error message can be a bit cryptic), this now validates the passed config (based on embroider-build/embroider#1083) and shows a helpful warning message. Note that this also moved this around a bit, leading to config being written only once on build, which should be a bit faster.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR ensures an error is thrown when trying to set a non-serializable macro config.
Not sure about the tests, if that is the correct way to put them or if there is a better way to add them - happy to change that if somebody points me to a better/correct way!
Closes #1082