eviltrout / ember-performance

A suite of tests for EmberJS to help with performance
140 stars 27 forks source link

link-to benchmarks do not run against canary ember #34

Open cowboyd opened 9 years ago

cowboyd commented 9 years ago

The APIs which the benchmark uses to create a router appear to no longer work. At first blush, It appears that its the lack of a container with properly registered dependencies. When running the link-to/active benchmark, you see this.

TypeError: Cannot read property 'recognizer' of undefined
    at isActiveForRoute (http://builds.emberjs.com/canary/ember.prod.js:20441:35)
    at computeActive (http://builds.emberjs.com/canary/ember.prod.js:20428:13)
    at computeLinkViewActive (http://builds.emberjs.com/canary/ember.prod.js:20144:16)
    at Descriptor.ComputedPropertyPrototype.get (http://builds.emberjs.com/canary/ember.prod.js:10587:28)
    at get (http://builds.emberjs.com/canary/ember.prod.js:16097:21)
    at __exports__.default.Mixin.create.get (http://builds.emberjs.com/canary/ember.prod.js:31892:16)
    at Benchmark.uid1420732482868createFunction [as compiled] (<anonymous>:15:66)
    at clock (http://localhost:4200/assets/test-client.js:3015:32)
    at clock (http://localhost:4200/assets/test-client.js:3223:18)
    at cycle (http://localhost:4200/assets/test-client.js:3413:47)

It appeared that the internal router.js router is not being initialized.

We were able to solve this problem, but ran issue after issue most seemingly related to the lack of properly initialized container, so we figured it was time to report it and see if there were a cleaner solution.

jamesarosen commented 9 years ago

I opened https://github.com/ember-cli/ember-cli/issues/3995 in the hopes that we can fix this in Ember-CLI's startApp test helper. There may be better solutions, but that seems like a reasonable place to me.