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

Resolve the app's config instead of using ember-get-config #77

Conversation

bertdeblock
Copy link
Contributor

My main motivation for this switch is this issue: mansona/ember-get-config#39.

import { isNone } from '@ember/utils';
import { closest } from './-private/closest-string';
import { macroCondition, isDevelopingApp } from '@embroider/macros';

const REGISTERED_ARGS = Symbol('args');
const INTERCEPT_CLASS = 'ForbidExtraArgsIntercept';

function shouldThrowErrors(): boolean {
function shouldThrowErrors(owner: any): boolean {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can also pass along the actual config instead of the owner, maybe that's less "weird", though that's a bit more work on the invocation side.

@bertdeblock
Copy link
Contributor Author

bertdeblock commented Apr 14, 2022

Was also wondering if it would make more sense to change throwErrors into a build time option since we strip out the calls to shouldThrowErrors at build time anyways when not developing the app.

EDIT: Regardless if the issues with ember-get-config, I think this ^ is probably the way to go? Configuring throwErrors seems like something you only want to define at build time?

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.

1 participant