Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

u3d/prettify: Parse Android command invocation failure #245

Merged

Conversation

niezbop
Copy link
Member

@niezbop niezbop commented Jan 30, 2018

Pull Request Checklist

  • My pull request has been rebased on master
  • I ran bundle exec rspec to make sure that my PR didn't break any test
  • I ran bundle exec rubocop to make sure that my PR is inline with our code style
  • I have read the code of conduct

Pull Request Description

This adds support in the prettifier for failure when invoking command for Android. This turns this chunk:

CommandInvokationFailure: Unable to merge android manifests. See the Console for more details. 
java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Applications/android-sdk-macosx/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity_5.6.5f1/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar" -

stderr[

]
stdout[
Warning: [Temp/StagingArea/AndroidManifest-main.xml:16, /SOME_PATH/Temp/StagingArea/android-libraries/unity-android-resources/AndroidManifest.xml:1] Main manifest has <uses-sdk android:targetSdkVersion='15'> but library uses targetSdkVersion='26'
]
exit code: 1
  at UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) [0x00000] in <filename unknown>:0 
  at UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) [0x00000] in <filename unknown>:0 
  at UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) [0x00000] in <filename unknown>:0 
UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions, Boolean)
UnityEditor.BuildPipeline:BuildPlayerInternal(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/BuildPipelineBindings.gen.cs:308)
UnityEditor.BuildPipeline:BuildPlayer(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/BuildPipelineBindings.gen.cs:242)
UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/BuildPipelineBindings.gen.cs:205)
UnityEditor.BuildPipeline:BuildPlayer(String[], String, BuildTarget, BuildOptions) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/BuildPipelineBindings.gen.cs:199)
WWTK.SimpleBuild:GenericBuild(String, BuildTarget, BuildOptions, Boolean) (at Assets/SimpleBuild/Editor/SimpleBuild.cs:577)
WWTK.SimpleBuild:PerformGenericAndroidBuild(Boolean) (at Assets/SimpleBuild/Editor/SimpleBuild.cs:367)
WWTK.SimpleBuild:PerformAndroidBuild() (at Assets/SimpleBuild/Editor/SimpleBuild.cs:324)
 
(Filename: Assets/SimpleBuild/Editor/SimpleBuild.cs Line: 577)

into a more readable:
prettified_cif_android

@niezbop niezbop requested a review from lacostej January 30, 2018 10:46
"start_pattern": "CommandInvokationFailure: (?<message>.+\\.)",
"store_lines": true,
"end_pattern": "^\\n",
"start_message": "[ANDROID] Command invokation failure: %{message}",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we want to fix their typo in our message :) Or not. Same for the rules names.

WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean invocation rather than invokation right? That would probably be clearer yeah. I was wondering if that's not an intended typo carrying some form of meaning, though I couldn't find any. I'll rename those

@niezbop niezbop changed the title u3d/prettify: Parse Android command invokation failure u3d/prettify: Parse Android command invocation failure Jan 30, 2018
@niezbop niezbop merged commit 68dedbc into DragonBox:master Jan 30, 2018
@niezbop niezbop deleted the prettify/parse_command_invokation_failure branch January 30, 2018 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants