PDA

View Full Version : Project build breaks in SA 4.2.1 after upgrading to 6.5.x / Ext.app.route.Route



rmaliborski
20 Jul 2017, 3:31 AM
As stated above, in the SA 4.2.1 build fails for the projects which were upgraded from the previous version of the SA to the ExtJS 6.5. The reason is the "requires" directive for Ext.app.route.Route (in ExtJS 6.5 it seems to be Ext.route.Route) which occurs in the generated *.js files.
I tried to manually replace Ext.app.route.Route withExt.route.Route in the affected files in the project's "metadata" subdirectory, but then the Architect reports an error for the modified ViewControlers while loading the project. Removing existing routes and adding them again doesn't fix the problem.

Oddly it doesn't happen for new projects in SA 4.2.1, where Ext.route.Route is used in the generated .js files...

petr.felzmann
20 Jul 2017, 10:45 AM
Are those your steps?

Create Ext 6.2 project using the route in SA 4.1 or earlier
Open the project in SA 4.2.1 (upgrading the project)
Upgrade Ext framework to 6.5

rmaliborski
21 Jul 2017, 2:25 AM
Not really my case, because my projects are a bit older and initially created with SA 3.5.1 and then upgraded a few times until 4.1.2.

I've tested your scenario with a trivial new project created with SA 4.1.2 and a dummy route, which then I upgraded to ExtJS 6.5 in SA 4.2.1. The conversion from Ext.app.route.Route -> Ext.route.Route worked. It worked regardless of whether I used Cmd 6.2x or 6.5x to create the initial project's scaffold. So far so good.
So I gave my projects another try and finally was able to get the Ext.app.route.Route converted as well. The problem seems to be the long project upgrade time (even with i7@4GHz, SSD & 16GB RAM...) and the fact that the upgrade consists of multiple steps, some of which don't block the UI and if you miss the Cmd's output in the console (or don't know what to expect), you can easily close the SA somewhere in the middle of the upgrade 8-|... I suppose it could have happened with me at first...

Still, even though the updates in the project files were carried out correctly, the integration of the framework failed (see the attached log). I had to integrate the framework manually in the command line:
sencha app upgrade --path [...]
sencha app refresh && sencha app build development
Because sencha app build messed with project files (???) and I got a lot of strange errors like methods called on undefined or unknown classes/:) while loading the applications, I had to open the project in the SA again and let it automatically build (I didn't even have to save the project). Now the projects load w/o errors and seem to be completely upgraded.
I think I would be really great if the UX during the upgrade process could be improved. Now it's not only tricky but even make a kind of messy impression:s.


56645