Skip to content

refactor(esp32): migrate linker paths and retire test PathBuf exception #1512

Description

@zackees

Context

The full Linux Dylint run for fbuild 2.5.29 fails with 19 ban_std_pathbuf errors in the new crates/fbuild-build-esp/src/esp32/esp32_linker_tests.rs split out by #1509. The test module constructs Esp32Linker, whose existing constructor and fields take raw PathBuf; the production implementation in esp32_linker.rs is already on the legacy lint allowlist. Moving tests to a separate file exposed this existing API boundary. The release-gate fix in #1510 needs a documented exception for this test file, then the exception should be retired by migrating the API.

The risk is real: raw paths can differ in spelling on Windows, affecting cache-key behavior (#436, #437, #282). The tests are currently the narrow place where raw values are necessary to exercise the unchanged linker API.

Proposal

  1. For the immediate release gate, document and allowlist only esp32_linker_tests.rs under ban_std_pathbuf, leaving production behavior unchanged.
  2. Migrate Esp32Linker owned path inputs/fields and dependent call sites to NormalizedPath where possible; retain raw PathBuf only at genuine OS/FFI edges.
  3. Remove the temporary test-file allowlist entry when the test constructors can use normalized paths.

Acceptance criteria

Decisions

Related issues

Activity

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