Skip to content

lint: enforce that every FastLED version string agrees, and that a release tag matches them #4444

Closed

Description

@zackees

Follow-up to #4442 / #4443.

Problem

The version is written by hand in four places, and nothing checks that they agree with each other or with the release tag:

Location Form
library.properties version=X.Y.Z
library.json "version": "X.Y.Z"
src/FastLED.h #define FASTLED_VERSION XYYYZZZ (1 + 3 + 3 digits)
release_notes.md first heading, FastLED X.Y.Z (optionally (Next Release))

They drifted without anything noticing. Before #4443, master had library.properties = 3.10.4, library.json = 3.10.3 and FASTLED_VERSION = 3010004 while 3.10.5 was already published. Tag 3.10.4 itself shipped with library.json still saying 3.10.3. An Arduino UNO Q user who installed master correctly saw "3.10.4" in the IDE, concluded the install had not worked, and the Library Manager offered to "update" them back to a broken release.

Proposed check

1. Consistency (runs in bash lint, every PR). Parse the four locations and fail unless they all encode the same X.Y.Z, including the integer encoding of FASTLED_VERSION. Report every location and its value on failure. This is a cross-file structural check, so per agents/docs/linter-architecture.md it belongs on the Python side, not in the Rust per-file linter.

2. Not behind the latest release (same check). The shared version must be strictly greater than the highest X.Y.Z git tag that is an ancestor of HEAD — master is always the next release. Must degrade to a skip with a note, not a failure, when tags are unavailable (shallow CI clones, ZIP downloads); CI jobs that want this enforced need fetch-depth: 0 or fetch-tags.

3. Tag match (runs on tag push). A workflow triggered on X.Y.Z tags fails if the tag name differs from the in-tree version, and if the top release_notes.md heading still says (Next Release). No workflow currently triggers on version tags, so this is a new one.

Acceptance

Open question

Whether to go further and generate three of the four from one source of truth instead of linting them. Linting is the smaller change and catches the same drift; library.properties and library.json must exist as static files for the Arduino and PlatformIO registries either way.

Activity

  1. zackees commented on Sep 19, 2026

    @zackees
    MemberAuthor

    Rule change for check 2 ("not behind the latest release"), after looking at how the PlatformIO registry picks up FastLED.

    Its legacy crawler publishes whatever version library.json / library.properties show on the default branch; no tag or release triggers it. So master must not be ahead of the newest tag either, or unreleased master gets published under that number. #4449 moved master back to 3.10.5 for this reason.

    Revised rule, implemented as bash release check in #4448:

    • steady state: manifests + FASTLED_VERSION agree and equal the newest reachable tag; release_notes.md may open with the next version only if marked (Next Release)
    • release PR (--releasing): exactly one step past the newest tag, notes heading final

    Remaining for this issue: call that check from bash lint, add the tag-push workflow, and cover the two sites the check does not read yet (docs/Doxyfile PROJECT_NUMBER = 3.10.3, and the FASTLED_SHOW_VERSION message in src/FastLED.h = 3.010.003).

  2. zackees commented on Sep 22, 2026

    @zackees
    MemberAuthor

    All acceptance criteria are now met:

    The two extra sites from the triage comment (docs/Doxyfile PROJECT_NUMBER, FASTLED_SHOW_VERSION message) are read by the check and covered by tests.

    🤖 Generated with Claude Code

  3. moved this from Triage to Done in FastLED Trackeron Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions