Skip to content

[BUG]: .svg.vec Metadata Parsing Issue with Repeated Build #686

Open
@koutja

Description

@koutja

Is there an existing issue for this?

  • I have searched the existing issues

Version

5.10.0

Command type

build_runner (Default)

What happened?

When running the build command with settings that include .svg.vec files (generated by vector_graphics_compiler), the file is generated correctly the first time. However, running the build command again does not update the file as expected. The following warning consistently appears in the console:

[WARNING] Failed to parse SVG 'assets/vec/markers/disabled.svg.vec' metadata: FileSystemException: Failed to decode data using encoding 'utf-8'

Configuration

flutter_gen:
  parse_metadata: true

Expected Result

  • On every build, .svg.vec files should be correctly updated if their sources have changed.
  • No warnings about metadata parsing or encoding errors should appear.

Actual Result

  • The file is generated correctly only on the first build.
  • On subsequent builds, the file is not updated.
  • The warning about failing to parse SVG metadata due to a UTF-8 decoding error appears every time.

Steps to Reproduce

  • Generate .svg.vec files using vector_graphics_compiler.
  • Configure flutter_gen with parse_metadata: true.
  • Run the build command.
  • Observe that the file is created correctly.
  • Run the build command again without changing the source.
  • Observe that the file is not updated and the warning appears.

Relevant a pubspec.yaml.

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions