Goa "Tasks" In VSCodium

This is probably useless information for most people here, but it was a simple and mildly interesting experiment, so I thought I would “share with the class”.

I’ve been investigating IDEs for Genode (and other) projects, and since my primary requirements are wide (programming) language support and tool customizability, it looks like the main viable options are Eclipse and VSCodium. So despite my qualms about its Microsoft provenance, I have been playing around with VSCodium.

VSCodium makes it very easy to add custom “tasks”, which invoke a command-line command with various options. (This makes the UI a little alien compared to traditional IDEs, but I guess that’s the trade-off.)

What Genode command would be useful for my first “task” experiment? Goa, of course! So I used VSCodium to follow the first example in the “Applications” book (pg. 7 - 10). Then I added a “tasks.json” file to the project directory, and added the following content to it:

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Goa: Build",
            "type": "shell",
            "command": "goa",
            "args": [
                "build"
            ],
            "problemMatcher": [],
            "group": "build"
        },
        {
            "label": "Goa: Run",
            "type": "shell",
            "command": "goa",
            "args": [
                "run"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}

Saving this file adds “goa build” and “goa run” commands to the list of available “tasks”, under the names “Goa: Build” and “Goa: Run”, respectively.

It’s not terribly hard to see the basic idea behind most of this JSON config, but it is worth noting that setting “isDefault” to true makes “Goa:Run” the default Build command for the project, which can be invoked using Shift+Ctrl+B.

With this in place, when you invoke the “tasks” from the menu (or Shift+Ctrl+B), you get the results in a console output window, exactly as described in the book!

These elementary tasks barely scratch the surface of what’s possible (they don’t even require variable command-line arguments, after all), but the fact that this was successful (and easy!) encourages me to continue experimenting with VSCodium. As I learn more and/or add more interesting “tasks”, I will share it here, just in case it’s useful to someone else.

3 Likes