Skip to content

Provide a clear error message when more than 1 SerializedFile with the same name is analyzed #51

Description

@SkowronskiAndrew

We should offer a better error message if you run analyze on more than one version of a particular builds, or on more than one BuildReport that has the same filename. Currently we just log an SQL error, such as SQLite Error 19: 'UNIQUE constraint failed: serialized_files.id'.

Example:

PS C:\Temp\TwoBuildReports> UnityDataTool analyze . -p "*.buildreport"
Processing 50% (1/2) BuildReport-Player\LastBuild.buildreport
Error processing file: C:\Temp\TwoBuildReports\BuildReport1\LastBuild.buildreport
Microsoft.Data.Sqlite.SqliteException: SQLite Error 19: 'UNIQUE constraint failed: serialized_files.id'.
Processing 100% (2/2) BuildReport1\LastBuild.buildreport
Finalizing database. Successfully processed files: 2, Failed files: 0, Ignored files: 0

This also related to #48 because in the example above the last line claims that both files were correctly analyzed

Note: originally I had hope that we might support analyzing multiple builds together (#36). However that approach introduces complexities and problems so instead we will focus on giving clear documentation and testing coverage for the more controlled scope of supporting just a single build.

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