Skip to content

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