Skip to content

Spinner info#476

Open
jimc wants to merge 2 commits into
arighi:mainfrom
jimc:spinner-info
Open

Spinner info#476
jimc wants to merge 2 commits into
arighi:mainfrom
jimc:spinner-info

Conversation

@jimc

@jimc jimc commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

make vng's spinner display scriptable content,
via envar: VNG_SPINNER_INFO

this lets a long-running multi-tree, multi-build batch build
provide custom info to the spinner, like work-tree, branch,
sha -dirty, config-name, config-sha etc.

vng then displays user info if user cares to add it.

while here, add a feature - if envar val matches ^\d+:.+$
the leading number is stripped and used to change the width.

$ VNG_SPINNER_INFO=20:foo vng -bv
▅▆▇██▇▆▅▄▃▂▁▁▂▃▄ ⚙️c building kernel [foo] (1 sec)
DESCEND objtool
INSTALL libsubcmd_headers
▇▆▅▄▃▂▁▁▂▃▄▅▆▇██ ⚙️c building kernel [foo] (1 sec)
Kernel: arch/x86/boot/bzImage is ready (#85)

the longer wave is vaguely pleasant to see from across the room.

@jimc

jimc commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

it looks like the validation harness is choking on a glob
I dont know where this is happening, no time to dig myself.

Im hoping the error is obvious to you guys.

'''
YAML
pylint vng '/*.py'
The glob pattern '
/.py' is being passed as a literal argument rather than being expanded by the shell. Pylint doesn't interpret shell glob patterns, so it's trying to find a file literally named **/.py, which doesn't exist.

Fix
Replace line 35 with a proper approach that expands the glob pattern:

YAML

  • name: Analysing the code with pylint
    run: |
    set -euxo pipefail

    find vng -name '*.py' -exec pylint {} +

    flake8 vng
    find . -name '*.py' | xargs flake8
    Alternatively, if you want to keep it simpler and more consistent with your flake8 approach:

YAML

  • name: Analysing the code with pylint
    run: |
    set -euxo pipefail

    find vng -name '*.py' | xargs pylint

    flake8 vng
    find . -name '*.py' | xargs flake8
    '''

jimc added 2 commits June 12, 2026 09:19
Read VNG_SPINNER_INFO from the environment and append it to the spinner
header. This allows build scripts to inject context-specific metadata
(like worktree+target @sha) directly into the live status line.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Extend VNG_SPINNER_INFO to allow user to widen the spinner wave, by
prepending the info string with a width:

$ VNG_SPINNER_INFO=50:foo vng -bv
▃▄▅▆▇██▇▆▅▄▃▂▁▁▂▃▄▅▆▇██▇▆▅▄▃▂▁▁▂▃▄▅▆▇██▇▆▅▄▃▂▁▁▂▃▄ ⚙️c building kernel [foo] (0 sec)
  DESCEND objtool

The longer wave is vaguely pleasant to see from across the room.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant