apache / cordova-paramedic

Apache Cordova - Paramedic
https://cordova.apache.org/
Apache License 2.0
36 stars 53 forks source link

`run` step swallows eventual errors #133

Open janpio opened 5 years ago

janpio commented 5 years ago

Compare this:

E:\Projects\Cordova\cordova-plugin-globalization (master -> origin) (cordova-plugin-globalization@1.11.1-dev)
λ cordova-paramedic --platform windows --plugin .
cordova-paramedic: Will use the following cli: cordova
cordova-paramedic: creating temp project at C:\Users\Jan\AppData\Local\Temp\tmp-19852giriNmT9CpmS
$ cordova create C:\Users\Jan\AppData\Local\Temp\tmp-19852giriNmT9CpmS --no-telemetry --no-update-notifier
C:\Users\Jan\AppData\Local\Temp\tmp-19852giriNmT9CpmS E:\Projects\Cordova\cordova-plugin-globalization
cordova-paramedic: installing plugins
cordova-paramedic: installing plugin E:\Projects\Cordova\cordova-plugin-globalization --no-telemetry --no-update-notifier
$ cordova plugin add E:\Projects\Cordova\cordova-plugin-globalization --no-telemetry --no-update-notifier
cordova-paramedic: installing plugin C:\Users\Jan\AppData\Local\Temp\tmp-19852giriNmT9CpmS\plugins\cordova-plugin-globalization\tests --no-telemetry --no-update-notifier
$ cordova plugin add C:\Users\Jan\AppData\Local\Temp\tmp-19852giriNmT9CpmS\plugins\cordova-plugin-globalization\tests --no-telemetry --no-update-notifier
cordova-paramedic: versions of installed plugins:
$ cordova plugins --no-telemetry --no-update-notifier
cordova-paramedic: installing plugin cordova-plugin-test-framework --no-telemetry --no-update-notifier
$ cordova plugin add cordova-plugin-test-framework --no-telemetry --no-update-notifier
cordova-paramedic: installing plugin C:\Users\Jan\scoop\persist\nvm\nodejs\v10.12.0\node_modules\cordova-paramedic\paramedic-plugin --no-telemetry --no-update-notifier
$ cordova plugin add C:\Users\Jan\scoop\persist\nvm\nodejs\v10.12.0\node_modules\cordova-paramedic\paramedic-plugin --no-telemetry --no-update-notifier
cordova-paramedic: installing plugin C:\Users\Jan\scoop\persist\nvm\nodejs\v10.12.0\node_modules\cordova-paramedic\debug-mode-plugin --no-telemetry --no-update-notifier
$ cordova plugin add C:\Users\Jan\scoop\persist\nvm\nodejs\v10.12.0\node_modules\cordova-paramedic\debug-mode-plugin --no-telemetry --no-update-notifier
cordova-paramedic: setting the app start page to the test page
cordova-paramedic: adding platform windows (with:  --no-telemetry --no-update-notifier)
$ cordova platform add windows --no-telemetry --no-update-notifier
cordova-paramedic: successfully finished adding platform windows
cordova-paramedic: checking the requirements for platform: windows
$ cordova requirements windows --no-telemetry --no-update-notifier
cordova-paramedic: successfully finished checking the requirements for platform: windows
local-server: scanning ports from 7008 to 7208
local-server: port 7039 is available
local-server: starting local medic server
cordova-paramedic: writing medic log url to project http://127.0.0.1:7039
Start running tests at 2:16:10 PM
cordova-paramedic: running tests locally
cordova-paramedic: running command cordova run windows --no-telemetry --no-update-notifier
$ cordova run windows --no-telemetry --no-update-notifier
cordova-paramedic: waiting for test results

(which will fail after the timeout)

to this output running the build in the tmp project directly:

C:\Users\Jan\AppData\Local\Temp\tmp-19852giriNmT9CpmS  (helloworld@1.0.0)
λ cordova build windows
ENV var MSBUILDDIR is set C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin
Building project: C:\Users\Jan\AppData\Local\Temp\tmp-19852giriNmT9CpmS\platforms\windows\CordovaApp.Windows10.jsproj
        Configuration : debug
        Platform      : anycpu
        Buildflags    : /p:AppxBundle=Never
        MSBuildTools  : C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin
buildProject spawn: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild [ 'C:\\Users\\Jan\\AppData\\Local\\Temp\\tmp-19852giriNmT9CpmS\\platforms\\windows\\CordovaApp.Windows10.jsproj',
  '/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal',
  '/nologo',
  '/p:Configuration=debug',
  '/p:Platform=anycpu',
  '/p:AppxBundle=Never' ] { stdio: 'inherit' }
  prebuild.js: Patching platform `10`
  - Injected `base.js` reference to `/www/cdvtests/index.html`
  - Removing /( *)(<script\s+(?:type="text\/javascript"\s+)?src="\/\/Microsoft.WinJS.2.0\/js\/base.js">\s*<\/script>)(\s*)/ from /www/cdvtests/index.html
  - Removing /( *)(<script\s+(?:type="text\/javascript"\s+)?src="\/\/Microsoft.Phone.WinJS.2.1\/js\/base.js">\s*<\/script>)(\s*)/ from /www/cdvtests/index.html
C:\Users\Jan\AppData\Local\Temp\tmp-19852giriNmT9CpmS\platforms\windows\CordovaApp.Windows10.jsproj(86,9): error : The following component requires .NET Native compilation which is not available  when targeting 'Windows10' and 'AnyCPU'. Consider changing the targeted processor architecture to one of the following: 'x86, x64, ARM' (if you are using command line this could be done by addi ng '--archs' parameter, for example: 'cordova build windows --archs=x64'). C:\Users\Jan\AppData\Local\Temp\tmp-19852giriNmT9CpmS\platforms\windows\plugins\cordova-plugin-globalization\Globalizat ionProxy.winmd
No valid MSBuild was detected for the selected target: Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild: Command failed with exit code 1

So it seems there is some error handling missing here:

cordova-paramedic: running tests locally
cordova-paramedic: running command cordova run windows --no-telemetry --no-update-notifier
$ cordova run windows --no-telemetry --no-update-notifier
cordova-paramedic: waiting for test results

Even if the error is not handled, at least outputting it would be better and could be noticed by the user.

janpio commented 5 years ago

PS: This exact problem shown above can be worked around by adding --args=--archs=x64 to the paramedic call: cordova-paramedic --platform windows --plugin . --args=--archs=x64