-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Confusing behaviour from visual-studio plugin when a configured toolChain isn't present #766
Comments
I've found another instance of this, which I can't work around, which might eventually block me. Environment: Gradle 3.1, Windows 10 Version 1607, now with MinGW installed.
This, again, doesn't create the full set of Visual Studio tasks. This is a bit of a nuisance for us as we're looking at (but haven't got to yet) cross-compiling both locally (MinGW / VM with shared disk / Windows Linux Subsystem) and also remote (Visual C++ for Linux) and it would be appreciated if the Visual Studio plugin would just generate the IDE projects and solutions. |
Thanks for reporting the limitation between Visual Studio and Gcc. The visual studio integration is limited when it comes to your current scenario. There is some idea in discussion in how this can be improved in order to provide a better solution. The IDE, especially for C++, is opinionated on certain modeling which make it the integration harder than it seems. We decided not to take route of generating native IDE projects and solutions because of the complexity when it comes to mapping generated source set, pre-build, pre-link and post-link steps. The current solution is by far perfect and because of this it's harder to integrate current Visual Studio plugins. It's best to seek a solution in Gradle as you will be able to reuse the logic on local developer machine as well as CI server. That been said, share your various usage scenario with us so we can take them into account during future design improvement. |
I suppose I should clarify, my issue is that the Visual Studio plugin won't create some of the IDE tasks when Gradle knows that it can't build that target, but it's not consistent and it's not explained - i.e. it creates the Project and Filters tasks, but not the Solution task or the encompassing lifecycle tasks. I would like the Visual Studio plugin (or any IDE project generator) to work independently from whether the target binaries are buildable, or, if it must be tied to whether to something is buildable, then it shouldn't generate only half the tasks - it should generate none of them. I'm not expecting Gradle's Visual Studio plugin to generate Visual Studio projects with VS-equivalent build steps (pre-build, pre-link, etc.) - we're implementing all the build logic in Gradle, however, almost all of our developers will want to work in Visual Studio, so it's paramount that I'm able to generate something. I've already written quite a lot of gradle (and will write more yet) to modify the generated Visual Studio projects, but it's much easier when I can depend on Gradle having created the projects in the first place :) |
Thanks for reporting this issue, we will consider your scenario in the improvement work for Visual Studio integration. |
Issue moved to gradle/gradle-native #496 via ZenHub |
In a script in which the configured toolChain isn't available to Gradle, the visual-studio plugin won't generate the solution and lifecycle tasks.
Expected Behavior
The visual-studio plugin should either always generate all tasks, regardless of the available toolchains, or report a useful error.
Current Behavior
On a machine without GCC, with the following code
gradle tasks --all output is
When it should be the following (output created by either changing the toolChain for VisualCpp or after installing gcc)
Context
Discovered while writing code to allow my Gradle scripts to intentionally select a specific toolChain. Doesn't block anything, just, confusing initially.
Steps to Reproduce (for bugs)
Code above.
Your Environment
Gradle 3.1
Windows 10 Version 1607
The text was updated successfully, but these errors were encountered: