I’ve been trying to upgrade our product from Ember 2.8.3 to Ember 2.12.3 (i.e. an LTS upgrade).
It took me a lot of time to fix most of the “modified twice in a single render” errors which previously were deprecations. Of course I would have had to fix them sooner or later but I would have expected that such a breaking change would warrant a major version jump (see SemVer).
Also I found those errors hard to debug and fix even with the help of this ticket and this repository. I’m wondering whether other frameworks have similar problems and why there are not more people stumbling upon this problem (bad code on our part?).
Then I also got the “infinite rendering invalidation detected” error. This one took me two days since I first had to get an understanding of glimmer2 in order for me to be able to track down the real source. In the end it was the fault of an addon.
In the same vein I got an error “Attempting to inject an unknown injection: ‘service:media’”. It also turned out to be a problem with an addon but again it wasn’t easy to track down, you always have to dig into Ember’s internals.
What made the last two problems so hard to debug is that the faulty addon or my own code wasn’t even on the callstack. It was made up of only Ember functions (which is understandable with all the asynchronicity going on). So when the error message doesn’t hold enough information to pinpoint the error the only option is to debug into Ember itself. With such a huge framework this can be a daunting task.
Finally I had a problem related to gridstack. Somehow when changing route parameters (which reinitializes our gridstack instance) components started leaking and old event handlers were called which led to various errors. This behavior didn’t appear in Ember 2.8.3. I wasn’t able to find the reason for the leak in time.
So after two weeks I had to cancel the upgrade and backport the compatible changes to 2.8.3. I will retry the upgrade when I have more time.
I’m working with Ember for over two years now so I know my way around quite some of its internals. But I’m asking myself how a newcomer would fare. Tracking down the source of errors can be really tough. Of course I’m aware that’s not something specific to Ember.
Did anybody else face so many problems with the LTS upgrade?