Troubleshooting
This guide is designed to help if things don’t quite work as expected.
Finding Denvig resources on disk
Section titled “Finding Denvig resources on disk”In order to uniquely identify resources on disk we need to normalise the paths to a project and the resources within them. An ID is constructed for each resource based on the following format:
@{{project-slug}}|{{workspace}}|{{resource-type}}/{{resource-name}}The ID is then converted to a sha256 hash to ensure a valid filesystem path string that is predictable and unique. This hash is used for various internals such as log paths, service names and more.
Examples of resource IDs:
- Project:
@marcqualie/denvig#root - Action:
@marcqualie/denvig#root|action/hello - Workspace + Action:
@marcqualie/denvig#apps/web|action/dev
You can find the hash details for a resource with the following command:
denvig internals:resource-hash service/hello # Example output: abc123...
# You can also use workspace notation:denvig internals:resource-hash "apps/web|action/dev"
# Or use the --workspace flag:denvig internals:resource-hash action/dev --workspace apps/web
# a full ID can also be passed in:denvig internals:resource-hash "@marcqualie/denvig#apps/web|action/dev"You can also find the ID to verify it has been resolved correctly:
denvig internals:resource-id service/hello # @marcqualie/denvig#root|service/helloDirectly manage launchctl services
Section titled “Directly manage launchctl services”Denvig uses launchctl under the hood to manage services so everything can also be interacted with directly there.
Directly list all denvig launchctl services that are currently loaded by running:
launchctl list | grep denvigYou can forcefully stop and remove all denvig services at once by running:
launchctl list | grep denvig | awk '{print $3}' | xargs -I {} -n 1 launchctl bootout gui/$(id -u)/{}rm ~/Library/LaunchAgents/com.denvig.*You can target a specific service by using its resource hash (detailed above):
launchctl bootout gui/$(id -u)/com.denvig.<resource-hash>rm ~/Library/LaunchAgents/com.denvig.<resource-hash>.plistBrowsing Raw Logs
Section titled “Browsing Raw Logs”All logs are stored in ~/.denvig/logs/. You can tail the logs of a specific service by running:
tail -f ~/.denvig/logs/<resource-hash>.log