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

Correct place to report a bug? #23

Closed
toranb opened this issue Jul 20, 2017 · 3 comments
Closed

Correct place to report a bug? #23

toranb opened this issue Jul 20, 2017 · 3 comments

Comments

@toranb
Copy link

toranb commented Jul 20, 2017

@rwjblue I really like this project :) and greatly appreciate your involvement to move the community forward!

I started converting one of my addons today and found that when I destructure assert from @ember/debug the compiled output omits it for some odd reason. When I did some source diving I found what looks like a missing dependency (shown in the snippet at the bottom of this issue).

import { assert } from '@ember/debug';

enifed('ember-debug/index', ['exports', 'ember/features', 'ember-environment', 'ember-console', 'ember-debug/testing', 'ember-debug/error', 'ember-debug/features', 'ember-debug/deprecate', 'ember-debug/warn'], function (exports, _emberFeatures, _emberEnvironment, _emberConsole, _emberDebugTesting, _emberDebugError, _emberDebugFeatures, _emberDebugDeprecate, _emberDebugWarn) {
  'use strict';

  exports._warnIfUsingStrippedFeatureFlags = _warnIfUsingStrippedFeatureFlags;
  exports.getDebugFunction = getDebugFunction;
  exports.setDebugFunction = setDebugFunction;
  exports.assert = assert;
  exports.info = info;
  exports.warn = warn;

^^ In the above I see how warn would be injected/ and then wired up to the export but ... I don't see the same for assert. If this is the root cause, what project (or sub project) should land the PR to fix this so others can destructure assert without issue? Thank you in advance!

@rwjblue
Copy link
Member

rwjblue commented Jul 22, 2017

Firstly, the snippet you pasted was from Embers internal module registry (which is completely isolated from your apps modules).

A few things to review:

tldr; The assert import is supposed to be stripped in production builds. You may or may not have an issue, but we need to understand the actual circumstances a bit more first to diagnose.

Also, this will likely end up being an issue over on ember-cli-babel (not the "once and done" codemod).

@rwjblue
Copy link
Member

rwjblue commented Jul 25, 2017

Closing for now, hopefully my answer was helpful...

@rwjblue rwjblue closed this as completed Jul 25, 2017
@toranb
Copy link
Author

toranb commented Jul 26, 2017

@rwjblue yup -thanks for the direction. At this time I think I'll need to open an issue w/ ember-cli-babel describing my use case (of assert) to better understand the path forward

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

No branches or pull requests

2 participants