GithubHelp home page GithubHelp logo

Comments (18)

NullVoxPopuli avatar NullVoxPopuli commented on June 11, 2024 1

I confirm your reproduction steps behave as you say they do.

I think this may be something specific to your app/settings though.

I have an app running locally in production mode as well, and the inspector works:
image

So... this is good, we have an app that works and an app that doesn't, both with embroider -- so ... something is different between them.

from ember-inspector.

NullVoxPopuli avatar NullVoxPopuli commented on June 11, 2024 1

is this something people should be adding in manually?

it should not, adding the template-compiler like this is (imo) "intimate API" for run-time compiled components, which 99.999% of apps are not doing 🙃

from ember-inspector.

patricklx avatar patricklx commented on June 11, 2024 1

somehow _DEBUG_RENDER_TREE is false https://github.com/emberjs/ember-inspector/blob/main/ember_debug/libs/capture-render-tree.js#L10
although it should be set to true by ember-inspector: https://github.com/emberjs/ember-inspector/blob/main/skeletons/web-extension/boot.js#L13

from ember-inspector.

patricklx avatar patricklx commented on June 11, 2024 1

it probably is getting set. BUT:
classic build extends the existing EmberENV :

window.EmberENV = function(e, t) {
    for (var r in t)
        e[r] = t[r]
    return e
}(window.EmberENV || {}, {
    FEATURES: {},
    EXTEND_PROTOTYPES: {
        Date: !1
    },
    _APPLICATION_TEMPLATE_WRAPPER: !1,
    _DEFAULT_ASYNC_OBSERVERS: !0,
    _JQUERY_INTEGRATION: !1,
    _TEMPLATE_ONLY_GLIMMER_COMPONENTS: !0
})

whereas embroid build overwrites:

window.EmberENV = {
   FEATURES: {},
   _APPLICATION_TEMPLATE_WRAPPER: !1,
   _DEFAULT_ASYNC_OBSERVERS: !0,
   _JQUERY_INTEGRATION: !1,
   _TEMPLATE_ONLY_GLIMMER_COMPONENTS: !0
};

manually setting _DEBUG_RENDER_TREE in environment.js EmberENV will make inspector work

from ember-inspector.

gilest avatar gilest commented on June 11, 2024 1

Can confirm that setting EmberENV._DEBUG_RENDER_TREE = true this fixes the issue in the minimal reproduction app.

from ember-inspector.

patricklx avatar patricklx commented on June 11, 2024 1

the pr is merged and this can be closed. Although it's not released yet

from ember-inspector.

gilest avatar gilest commented on June 11, 2024

Thanks @NullVoxPopuli

I did some tests and found that a single line from your ember-cli-build is required to enable the component inspector to work in my reproduction.

  app.import('vendor/ember/ember-template-compiler.js');

I've pushed this to the embroider-working branch of the reproduction repo.

from ember-inspector.

RobbieTheWagner avatar RobbieTheWagner commented on June 11, 2024

@NullVoxPopuli is this something people should be adding in manually?

from ember-inspector.

gilest avatar gilest commented on June 11, 2024

Adding that line to ember-cli-build does not resolve this issue in a few ember 3.28 apps I tried it in.

from ember-inspector.

gilest avatar gilest commented on June 11, 2024

@NullVoxPopuli do you have any insight about why that fixes the issue in 4.6 apps or, regardless, the best repo for this issue to reside within?

from ember-inspector.

bendemboski avatar bendemboski commented on June 11, 2024

I am also seeing this in an app (private, unforch) running:

  • embroider 1.8.0 with static: true
  • ember-cli 4.7
  • ember-source 4.4.2

from ember-inspector.

RobbieTheWagner avatar RobbieTheWagner commented on June 11, 2024

@chancancode any ideas here?

from ember-inspector.

patricklx avatar patricklx commented on June 11, 2024

@NullVoxPopuli in limber I see some duplicate modules in the source for "@ember/-internals/environment/index". One without glimmer DEBUG enabled and another with DEBUG disabled... the one with DEBUG enabled is processed and thus sets _DEBUG_RENDER_TREE to true

from ember-inspector.

NullVoxPopuli avatar NullVoxPopuli commented on June 11, 2024

Hmm, duplicate modules is suspicious.
Gonna look in to that

from ember-inspector.

patricklx avatar patricklx commented on June 11, 2024

ah, thats the ember-template-compiler... its build with debug enabled..

from ember-inspector.

NullVoxPopuli avatar NullVoxPopuli commented on June 11, 2024

Ah, right. Then my issue (accidental working) will be fixed by the template layering RFC

from ember-inspector.

RobbieTheWagner avatar RobbieTheWagner commented on June 11, 2024

Is there a good way to fix this in inspector? I don't know much about how embroider works.

from ember-inspector.

gilest avatar gilest commented on June 11, 2024

@rwwagner90 Should be fixed once this PR is merged and released: embroider-build/embroider/pull/1252

This issue can probably be closed

from ember-inspector.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.