Github Codespaces (Programming in your browser for FRC) 2023 Update

Shared object files (.so) and header files (.h) and the toolchains should all be accessible via the PATH environment variable. All of those locations are normally included in the path variable and are where 3rd party libraries and binary and header files are supposed to go.

Everyone is guessing because you said there’s errors with no further details. If you provided the errors and exactly where they were occurring and well as the changes to the posted configuration, the help would likely be better.

This is the output I’m getting. I attempted to install the toolchain, but apparently it isn’t being put in the correct place, or I’m missing a config.
________________________________________________-

  • Executing task: ./gradlew build generateVsCodeConfig -Dorg.gradle.java.home=“/usr/local/sdkman/candidates/java/current”

Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details

No Toolchain Found for roboRio
Run ./gradlew installRoboRioToolchain to install one!

You can ignore this error with -Ptoolchain-optional-roboRio
For more information, run with --info

FAILURE: Build failed with an exception.

  • What went wrong:
    No Toolchain Found! Scroll up for more information.

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 28s

  • The terminal process “/usr/bin/bash ‘-c’, './gradlew build generateVsCodeConfig -Dorg.gradle.java.home=”/usr/local/sdkman/candidates/java/current"'" terminated with exit code: 1.
  • Terminal will be reused by tasks, press any key to close it.

And what’s the output when running ./gradlew installRoboRioToolchain

Another option would be to look for a container based on Ubuntu 22.04 which would let you use GCC as the desktop compiler.

./gradlew installRoboRioToolchain is successful. Doesn’t seem to matter though. I’m attempting to set it up from a default Ubuntu container.

From the little bit of research I’ve done, it appears the default container is Ubuntu 20.04, not 22.04.

I may have it working with Ubuntu 22.04. The build completes, so on Tuesday I’ll attempt to deploy to the RoboRio. Then I can clean up the Dockerfile a bit an share it out. Thanks everyone that commented.

1 Like

I worked on this for a while last week. Easiest solution was running the codespace on the wpilib rio docker image and building from the cli after setting JAVA_HOME. Syntax highlighting still did not work, however.

Do you mind if I update mine with whatever you prefer, or try to get it working with the single line it currently uses?

I didn’t know people already setup docker images for this. Which one are you using?

Definitely. I planned on working on it tonight a bit, to have a solid Dockerfile. Right now it just worked when I manually went in and did things, so I’ll need to review notes and make that code. Tomorrow I’ll be going to our work area, and I will double check that the build loads properly to RoboRio. I’ll share everything I come up with.

I may also take a look at what MrRedness provides and see if that works better.

1 Like

It’s the one normally used for CI.
https://hub.docker.com/r/wpilib/roborio-cross-ubuntu

I’ve come to a point where I’m not making progress, and I’m giving up for a time. I need to move on and work on writing code with the team. We’ll make do with a couple of laptops and shoulder surfing. This is what I had, which I think was close to working. Even though it shows installing the WPILibrary extension, I had to run it after setup. I then attempted to install the Rev Robotics Library, and I couldn’t get it to work. I figured that was a good time to call it quits for now.

This .devcontainer.json file does pretty well in getting working for C++. I was able to do a build of a FRC template.

{
  "image": "ubuntu",
  "postCreateCommand": "./gradlew installRoboRioToolchain && wget 'https://github.com/wpilibsuite/vscode-wpilib/releases/download/v2023.2.1/vscode-wpilib-2023.2.1.vsix' && mv vscode-wpilib-2023.2.1.vsix /opt code --install-extension /opt/vscode-wpilib-2023.2.1.vsix",
  "features": {
    "ghcr.io/devcontainers/features/github-cli:1": {},
    "ghcr.io/devcontainers/features/git:1": {},
    "ghcr.io/devcontainers-contrib/features/wget-apt-get:1": {},
    "ghcr.io/devcontainers/features/java:1": {}
      
  },
  "customizations": {
    "vscode": {
      "extensions": ["/opt/vscode-wpilib-2023.2.1.vsix","vscjava.vscode-java-pack","vscjava.vscode-gradle", "redhat.java", "vscjava.vscode-java-debug", "vscjava.vscode-java-dependency", "ms-vscode.cpptools"]
    }
  }
}
1 Like