Skip to content

cargo-generate fails on binary iOS notification.caf asset #10

Description

@dnorman

Summary

cargo generate https://github.com/ankurah/react-native-template fails before producing a project because cargo-generate attempts Liquid substitution inside the binary iOS sound asset:

Substitution skipped, found invalid syntax in react-app/ios/{{project-name | pascal_case}}/notification.caf

Observed with cargo-generate 0.23.12 against template commit f3c43b5.

Cause

react-app/ios/{{project-name | pascal_case}}/notification.caf is a CoreAudio binary, but cargo-generate.toml excludes only the keystore, PNG, and Gradle wrapper JAR binary paths. The generator therefore treats the CAF bytes as template text.

Proposed fix

Add the CAF asset (or a suitably narrow *.caf path glob) to [template].exclude.

Acceptance criteria

  • A fresh Sled generation completes.
  • A fresh Postgres generation completes.
  • The generated notification.caf is byte-identical to the template asset.
  • Preferably, CI runs at least one noninteractive cargo-generate smoke test so future binary assets cannot regress generation.

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