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

mirage: Replace assert() from @ember/debug with conditional throw #10367

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Jan 10, 2025

The @ember/debug import makes it harder to use the mirage code outside of an Ember.js context. This commit replaces the import with an if + throw combination. The main advantage of assert() is that it is compiled out of production code, but since the mirage code is not shipped to production anyway, this advantage doesn't actually apply here.

/cc @eth3lbert

Related:

The `@ember/debug` import makes it harder to use the mirage code outside of an Ember.js context. This commit replaces the import with an `if + throw` combination. The main advantage of `assert()` is that it is compiled out of production code, but since the mirage code is not shipped to production anyway, this advantage doesn't actually apply here.
@Turbo87 Turbo87 added A-frontend 🐹 C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear labels Jan 10, 2025
@Turbo87 Turbo87 merged commit ae28cce into rust-lang:main Jan 10, 2025
9 checks passed
@Turbo87 Turbo87 deleted the bye-bye-debug-assert branch January 10, 2025 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend 🐹 C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants