Skip to content

InkPreBuildValidationCheck.AssertNotCompiling() doesn't cause builds to fail when it should #220

@reallyfancy

Description

@reallyfancy

The comments in InkPreBuildValidationCheck.AssertNotCompiling() indicate that this script should cause a build to fail if Ink is currently compiling. Instead, the script just logs an error message to the console. Unity reports the build as successful, with 0 errors.

It looks like as of Unity 2019, regular errors or exceptions don't automatically fail a build. To trigger a build failure, you need to throw a BuildFailedException. There's an example in the docs here: https://docs.unity3d.com/ScriptReference/Build.IPreprocessBuildWithReport.html.

I've reproduced in Unity 6.0, but I imagine this is probably the case in older versions too - haven't had the chance to check!

I can open a PR to fix this if that's helpful. Let me know if so, and which versions you'd need me to test against.

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