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

[XABT] Use a response file for D8 task. #9546

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

jpobst
Copy link
Contributor

@jpobst jpobst commented Nov 22, 2024

Fixes: #9515

We have an AndroidX test that adds every package to a single project and tries to build it. If you reference enough of our library bindings NuGet packages, the command line to d8/java gets too long and throws an error:

Command 'build -c Release -bl' failed with exit code 1.
Errors:
MSB6003: The specified task executable "java.exe" could not be run. System.ComponentModel.Win32Exception (206): An error occurred trying to start process 'C:\Program Files (x86)\Android\openjdk\jdk-17.0.8.101-hotspot\bin\java.exe' with working directory 'D:\a_work\1\s\output\tests\allpackages\android\AllPackagesTest'. The filename or extension is too long. [D:\a_work\1\s\output\tests\allpackages\android\AllPackagesTest\AllPackagesTest.csproj]
MSB6003: at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) [D:\a_work\1\s\output\tests\allpackages\android\AllPackagesTest\AllPackagesTest.csproj]
MSB6003: at Microsoft.Build.Utilities.ToolTask.StartToolProcess(Process proc) [D:\a_work\1\s\output\tests\allpackages\android\AllPackagesTest\AllPackagesTest.csproj]
MSB6003: at Microsoft.Build.Utilities.ToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands) [D:\a_work\1\s\output\tests\allpackages\android\AllPackagesTest\AllPackagesTest.csproj]
MSB6003: at Microsoft.Build.Utilities.ToolTask.Execute() [D:\a_work\1\s\output\tests\allpackages\android\AllPackagesTest\AllPackagesTest.csproj]
Warnings:
APT2000: warn: removing resource com.companyname.AllPackagesTest:string/action_bar_expand_collapse_button without required default value. [D:\a_work\1\s\output\tests\allpackages\android\AllPackagesTest\AllPackagesTest.csproj]
APT2000: warn: removing resource com.companyname.AllPackagesTest:string/action_bar_expand_collapse_button without required default value. [D:\a_work\1\s\output\tests\allpackages\android\AllPackagesTest\AllPackagesTest.csproj]
MSB6002: The command-line for the "D8" task is too long. Command-lines longer than 32000 characters are likely to fail. Try reducing the length of the command-line by breaking down the call to "D8" into multiple calls with fewer parameters per call. [D:\a_work\1\s\output\tests\allpackages\android\AllPackagesTest\AllPackagesTest.csproj]

Allow MSBuild to generate a response file for the D8 task to avoid this error.

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.

D8 invocation doesn't use response files
1 participant