DeepBlueRobotics / lib199

Code that we reuse in different projects/years.
Other
2 stars 0 forks source link

Update Codespaces #64

Closed CoolSpy3 closed 1 year ago

CoolSpy3 commented 1 year ago

How did you figure all of this out?

Short answer: A lot of googling.

Long answer: The error was complaining that libc version GLIBC_2.32 couldn't be found. I spent a bunch of time trying to update the library. I couldn't find it online, and I couldn't get apt to update it. I eventually discovered that the package version was probably pinned to the Linux distro version, so I looked at the devcontainer files for anything which looked like an OS version number. Finding none, I tried to find the template repo I originally used to create them, and found that it was archived with a note that it had been centralized into devcontainers/templates. Using this info, I recreated the files using the recommended default settings. This still didn't fix it, so after some more fruitless debugging, I tried switching to the other java container type listed in the repository and that worked.

Next, I noticed the extensions weren't being installed correctly. It turns out GitHub changed the devcontainer.json syntax, so I just had to rewrite it to make it work.

Finally, I noticed the WPILib extension was still outdated. It looks like it wasn't updated on the VSCode marketplace, after poking about, I found that they distribute the vsix file in wpilibsuite/vscode-wpilib. I asked ChatGPT to generate a script to download the latest version and install it, and after modifying it with my own knowledge of GitHub and Linux APIs/utilities, I stuck it in with the devcontainer files. Then it was just playing around until I found the right hook in devcontainer.json to trigger it correctly. I also had to add an exit command so that it wouldn't open an extra terminal in VSCode.