Skip to content

Improving the build experience #46

@spiogit

Description

@spiogit

Epic: As a developer, especially a first-time user of the project, I do not want to get avoidable error message in the middle of a build. Instead, a preparation step before the build will tell me that the build will succeed with guarantee or at least with high likelihood.

Feature: Think autoconf + ahead-of-time check of available resources. This reduces the need to read + follow documentation and puts more of these preparations into code. It could be implemented first in one Syn component and then in similar form rolled out to others to decrease the participation barrier.

Something like:

diff --git a/Makefile b/Makefile
index 00fd32f..a40b63d 100644
--- a/Makefile
+++ b/Makefile
@@ -88,3 +88,10 @@ $(web_dir)/index.html: playbook.yml $(pages)
 .PHONY: check
 check: generate-api-docs
        $(vale_cmd)
+
+.PHONY: prep
+prep:
+       @go version >/dev/null 2>&1 || echo "Missing dependency 'go'. Please install: golang / https://golang.org/."
+       @test `go version | sed 's/.*go1\.\([[:digit:]]\+\)\..*/\1/'` -gt 12 || echo "Go version outdated, needs 1.13+, please update: golang / https://golang.org/."
+       @test `LANG=C df $(PWD) | tail -1 | awk '{print $$4}'` -gt 4000000 || echo "Disk space likely insufficient, needs 4+ GB."
+       @echo "All fine. Type 'make'."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions