How to get VSCode to only build release and not debug

Due to the slow build times of VSCode, is there anyway to have it NOT build the debug exec and only build the release exe that would be deployed to the RoboRio.

If this makes sense to do, we could conceivably cut build times in half?

Any ideas?

md

How long of a build time are you seeing? I suspect the issue isn’t related to release/debug.

About 2.5 - 3mins We have updated to WPILib 2.1, have turned on --offline mode…

BUILD SUCCESSFUL in 2m 19s
4 actionable tasks: 4 executed

Admittedly the PC is no speed demon, but It feels to me that VSCode does not do any sort of incremtal build. If we change one semi-colon, it takes the same as if we change multiple portions.

Eclisipe seemed to only recompile sections that changed, and link the resulting pieces together. My gut feeling is this is not how this system is working.

What sort of build times are you seeing at your end?

md

Can you post the full log? I’ve only seen build times in the minutes when —offline isn’t used, or if it’s not using the background daemon. Is it using the background daemon? Have you disabled desktop builds?

Can you also try running with --scan? I don’t know if that works with offline, but if not could you try an online build with that flag, and pm me the link it generates? That’ll show what all is taking time.

Peter, I can post the full log, (just the output window right?)
Thad, how do you turn on --scan?
And while I right this my last build was an acceptable 1:35 .

I have not quite figured out what the pattern is for the long build times yet.

md

Can you describe how to use --scan

BAck to 3min builds btw. Tell me how to get a log and I will post.

Run gradlew on the command line. Use the same command that vscode runs but add --scan to it. At the end it will print out a URL.

Here you go.

First with offline…

BUILD FAILED in 47s
A build scan will not be published due to this build running offline.
PS C:\Users\Team772\Documents\VSCode\cpp\CompBot2019RBV1>

Then with online

./gradlew.bat build -Dorg.gradle.java.home=“C:\Users\Public\frc2019\jdk” --scan

https://gradle.com/s/rrky4vhbxmktq

This is the scan link… the other one was the failed build. sorry.

https://gradle.com/s/6plurhyphht3w

That’s still a failed build. In command prompt, you have to quote things differently. You need to run

./gradlew.bat build "-Dorg.gradle.java.home=C:\Users\Public\frc2019\jdk" --scan

ok, one more time.

Publishing build scan…
https://gradle.com/s/cdx2ls23nt2ii

That ones still bad as well. You need to use the quoting style I posted above in order to get it working. It should actually say build complete, like a normal build.

ok one more time for real this time

UILD SUCCESSFUL in 4m 1s
4 actionable tasks: 4 executed

Publishing a build scan to scans.gradle.com requires accepting the Gradle Terms of Service defined at https://gradle.com/terms-of-service. Do you accept these terms? [yes, no] yes
Gradle Terms of Service accepted.

Publishing build scan…
https://gradle.com/s/dkbmnzmlfjnzo

That’s interesting, ive never seen a computer take anywhere near that long. Do you have any anti virus software installed on the system? Also, how many cpp files do you have? Can you zip up your src folder and upload it here or pm it to me? I’m wondering how many files you have, and if something weird is going on there. Because those times are pretty bad, and we’ve gotten better on much worse systems.

if you are on gitlab, not github, I can invite you to the repo.

let me know your userid on gitlab

Standard windows pc, I just (OH NO!) just disabled windows virus protection. No third party one is on this system.

With virus protection in windows disabled

BUILD SUCCESSFUL in 2m 55s
4 actionable tasks: 4 executed

Publishing a build scan to scans.gradle.com requires accepting the Gradle Terms of Service defined at https://gradle.com/terms-of-service. Do you accept these terms? [yes, no] yes
Gradle Terms of Service accepted.

Publishing build scan…
https://gradle.com/s/wfz4z3cd2diis

I just created one. @ThadHouse

That speed, with protection disabled is weird. What cpu is in your system, and how much ram?

Again, not a fast machine, but it not an issue last year under eclipse. I agree this is strange.