Skip to content

Validation framework: ApplyFix shouldn't be saving the fixed layer #3913

@cpichard

Description

@cpichard

Hi,
The validation framework is great, specially with the recent addition of the Fixers. I have been looking at trying to integrate it in usdtweak today, and one of the issue I am seeing is that the ApplyFix is writing the target layer once the fix is applied. It can fail if the target layer is the session layer. If the target is the root layer, it will save the file without the user knowing it. One might want to double check the fixes applied to the layers before committing the changes. Also on big layers with multiple errors, saving the file every time a fix is applied can be time consuming and is not really needed.
Ideally saving the fixed layer should be either left to the caller of ApplyFix, or added as an optional argument. Another option could be to create another function which would not save the fixed layer, but correctly return if the fix is applied.
Thanks !

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