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

Fix for Issue #13339 cause MS Visual Studio 2015 to always fail configuration for cpp plugin #20968

Open
epxilinx opened this issue Jun 8, 2022 · 5 comments
Labels
a:documentation Documentation content in:native-platform c, cpp, swift and other native languages support, etc re:windows Issue related to using Gradle on Windows

Comments

@epxilinx
Copy link

epxilinx commented Jun 8, 2022

The changes in #15975 add the vswhere argument -utf8which is not support by VS 2015 vswhere.exe version. Workaround is to manually install updated version of vswhere. Note that I cannot update MSVS version due to company restrictions.

Expected Behavior

Configuration of project that uses cpp application plugin should pass or at least fail with message indicating vswhere needs to be updated.
Note that there is an "ignoring" message when vswhere returns non-zero but it quickly results in a NPE. Failing with a meaningful vswhere exit code would have been a preferable error state.

Current Behavior

Configure project :myapp
Evaluating project ':myapp' using build file 'C:\dev\sb1\myapp\build.gradle'.
Starting process 'command 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe''. Working directory: C:\Program Files (x86)\Microsoft Visual Studio\Installer Command: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -all -legacy -format json -utf8
Successfully started process 'command 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe''

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':myapp'.
    java.lang.NullPointerException (no error message)

Direct call to vswhere:

"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -all -legacy -utf8
Visual Studio Locator version 2.4.1+g2035d08a45 [query version 1.16.1163.30317]
Copyright (C) Microsoft Corporation. All rights reserved.

Error 0x57: Unknown parameter: utf8

@epxilinx epxilinx added a:regression This used to work to-triage labels Jun 8, 2022
@epxilinx epxilinx changed the title Fix for Issue #13339 cause MS Visual Studio 2015 to always fail Fix for Issue #13339 cause MS Visual Studio 2015 to always fail configuration for cpp plugin Jun 8, 2022
@h0tk3y h0tk3y added in:native-platform c, cpp, swift and other native languages support, etc and removed to-triage labels Jun 10, 2022
@ov7a
Copy link
Member

ov7a commented Aug 8, 2023

Sorry for the late reply.


Sorry that you're having trouble with Gradle!

We appreciate the effort that went into filing this issue, but we must ask for more information.

As stated in our issue template, a minimal reproducible example is a must for us to be able to track down and fix your problem efficiently. Our available resources are severely limited, and we must be sure we are looking at the exact problem you are facing.

If we have a reproducer, we may be able also to suggest workarounds or ways to avoid the problem.

The ideal way to provide a reproducer is to leverage our reproducer template. You can also use Gradle Project Replicator to reproduce the structure of your project.

This issue will be closed after 7 days unless you provide more information.


Please, provide all the steps required to reproduce this and all relevant environment details

@ov7a ov7a added to-triage pending:reproducer Indicates that the issue requires a reproducer or will be closed after 7 days re:windows Issue related to using Gradle on Windows labels Aug 8, 2023
@github-actions github-actions bot removed the pending:reproducer Indicates that the issue requires a reproducer or will be closed after 7 days label Aug 8, 2023
@ov7a ov7a added the pending:reproducer Indicates that the issue requires a reproducer or will be closed after 7 days label Aug 8, 2023
@epxilinx
Copy link
Author

To reproduce the problem:

  1. Install VS 2015
  2. configure a gradle project that uses the cpp application plugin

@ov7a
Copy link
Member

ov7a commented Aug 10, 2023

@epxilinx Why do you think that this is a problem caused by Gradle and not VS2015?

@epxilinx
Copy link
Author

epxilinx commented Aug 10, 2023

@ov7a is VS2015 supported by gradle?
If it is supported the problem is gradle's faulty assumption that the -utf8 argument is supported by all versions of vswhere.
If it is not supported please advertise that fact either in the documentation or via a clearer error message from the plugin.

vswhere utf8 commit: microsoft/vswhere@2444e2e

@github-actions github-actions bot removed the pending:reproducer Indicates that the issue requires a reproducer or will be closed after 7 days label Aug 10, 2023
@ov7a
Copy link
Member

ov7a commented Aug 10, 2023

We don't have plans to support VS2015.
This issue can be addressed in the documentation.

@ov7a ov7a added a:documentation Documentation content and removed a:regression This used to work to-triage labels Aug 10, 2023
@lptr lptr added the to-triage label Dec 5, 2023
@ov7a ov7a removed the to-triage label Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:documentation Documentation content in:native-platform c, cpp, swift and other native languages support, etc re:windows Issue related to using Gradle on Windows
Projects
None yet
Development

No branches or pull requests

4 participants