I have multiple Sencha apps (each in their own workspace), and have been using packages from my local repository to share code between them. This worked great under Sencha Cmd 3.1.1, but after upgrading to 3.1.2, I find I now get an error when running "sencha app refresh --packages" to update each app to the latest package version.
I've put together a simplified example, using a package named "test" in two workspaces: "source", where the package is first created, and "dest", another workspace requiring the same package. (I'm running Windows 7, by the way.)
To create the package, I ran:
Which all works as expected. Then suppose I make some changes to the package and want to build a new version:Code:C:\workspaces\source>sencha generate package --name test --type code [ modify "creator" in C:\workspaces\source\packages\test\package.json to match local repo ] C:\workspaces\source>cd packages\test C:\workspaces\source\packages\test>sencha package build C:\workspaces\source\packages\test>sencha package add ..\..\build\test\test.pkg Sencha Cmd v184.108.40.2062 [INF] Adding package file ..\..\build\test\test.pkg [INF] Package added: test / 1.0.0 C:\workspaces\dest>sencha app refresh --packages [INF] Including theme package ext-theme-classic for app.theme=ext-theme-classic build [INF] Including code package test for build [INF] Package is already local: test/1.0.0
So far so good. But now when I attempt to refresh the "dest" app to pull in the new version:Code:[ modify "version" in C:\workspaces\source\packages\test\package.json to "1.0.1" ] C:\workspaces\source\packages\test>sencha package build C:\workspaces\source\packages\test>sencha package add ..\..\build\test\test.pkg Sencha Cmd v220.127.116.112 [INF] Adding package file ..\..\build\test\test.pkg [INF] Package added: test / 1.0.1
Any idea why this is happening or what is causing it? If I look at the packages in the local repo, things seem okay:Code:C:\workspaces\dest>sencha app refresh --packages [INF] Including theme package ext-theme-classic for app.theme=ext-theme-classic build [INF] Including code package test for build [WRN] Cannot extract package test to C:\workspaces\dest\packages\test because a folder by that name already exists, possibly for another version of this pacakge [WRN] if this is related to an application, please run 'sencha app refresh -pacakges' to upgrade packages [ERR] null at java.io.File.<init>(Unknown Source) at com.sencha.command.environment.WorkspaceEnvironment.loadPackageEnvironment(WorkspaceEnvironment.java:163) at com.sencha.command.environment.WorkspaceEnvironment$1.map(WorkspaceEnvironment.java:116) at com.sencha.command.environment.WorkspaceEnvironment$1.map(WorkspaceEnvironment.java:113) at com.sencha.util.CollectionUtil.transform(CollectionUtil.java:47) at com.sencha.util.CollectionUtil$MonadicList.transform(CollectionUtil.java:244) at com.sencha.command.environment.WorkspaceEnvironment.loadPackageEnvironments(WorkspaceEnvironment.java:112) at com.sencha.command.environment.WorkspaceEnvironment.resolvePackageEnvironments(WorkspaceEnvironment.java:90) at com.sencha.command.environment.AppOrPackageEnvironment.getRequiredPackageEnvironments(AppOrPackageEnvironment.java:165) at com.sencha.command.environment.AppOrPackageEnvironment.getRequiredPackagesNoThemes(AppOrPackageEnvironment.java:212) at com.sencha.command.environment.AppOrPackageEnvironment.getRequiredPackageNamesNoThemes(AppOrPackageEnvironment.java:203) at com.sencha.command.environment.AppEnvironment.<init>(AppEnvironment.java:66) at com.sencha.command.environment.BuildEnvironment.load(BuildEnvironment.java:193) at com.sencha.command.Sencha.loadBuildEnvironment(Sencha.java:374) at com.sencha.command.Sencha.main(Sencha.java:127)
(I'm not sure why the results are listed twice, but I think that happened under 3.1.1 as well. Also probably unrelated is the spelling error of "pacakge" and "-pacakges" in the refresh warning message. )Code:C:\workspaces>sencha package list . Sencha Cmd v18.104.22.1682 [INF] Listing of local catalog [INF] Package test [INF] 1.0.1, 1.0.0 [INF] Package test [INF] 1.0.1, 1.0.0 [INF] 2 package(s)
Any thoughts? I can't think of anything I'd be doing wrong, so I'm pretty stumped at this point... Any help is appreciated!