Skip to content

Symlinked local library not rebuilt after its sources change (stale objects without --clean) #1753

Closed

Description

@zackees

Summary

A library reached through a symlink (<proj>/lib/FastLED -> /home/niteris/dev/fastled2) is not rebuilt after its source changes under it with git checkout. The next fbuild deploy (no --clean) ships the old library object code.

Repro (fbuild 2.5.44, ESP32-C6, pioarduino 55.03.311)

  1. Project with lib/FastLED symlinked to a FastLED checkout on master. Run fbuild deploy <proj> -e c6.
  2. In the FastLED checkout, git checkout a branch that rewrites src/platforms/esp/32/core/fastspi_esp32_idf.h (FastLED#4919: about 340 changed lines; it adds spi_device_queue_trans).
  3. Run fbuild deploy <proj> -e c6 again.

Observed: the firmware's measured behavior was byte-for-byte identical between the two branches. Checking out master again and redeploying also gave identical output.

With --clean: the two branches differed as expected. 256 APA102 LEDs took 19,081 µs per frame on master and 560 µs on the PR.

The changed file is a header that .cpp.hpp unity files include. It is also possible the freshness check keys on the symlink's own mtime or path instead of the target files.

Expected

A change to any file under a local library, symlinked or not, including headers reached only through #include, invalidates that library's objects.

Notes

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