Skip to content

Orphan Class Files #45

Description

@jackmatt2

If a class name gets refactored or moved to a different package the existing snapshot in the __snapshots__ folder should be marked as an Orphan.

Might need to walk the directory tree after all tests have run beginning at getOutputDir(). This could be particularly problematic if the output dir is not a subdirectory of the class's package as there is no way to know where the original class is defined.

Activity

  1. jackmatt2 commented on Jul 18, 2021

    @jackmatt2
    CollaboratorAuthor

    Snapshot metadata headers may be able to resolve this issue along with other useful information about the creation of the snapshot.

    au.com.origin.snapshots.docs.MyFirstSnapshotTest.jsonSerializationTest={
      "version": 2.3.0,
      "serializer": "au.com.origin.snapshots.serializers.JacksonSnapshotSerializer",
      "srcFile": "src/main/java/au/com/origin/snapshots/docs/MyFirstSnapshotTest"
    }[
      {
        "age": 40,
        "name": "John Doe"
      }
    ]
    
  2. locked and limited conversation to collaborators on Nov 26, 2022
  3. converted this issue into a discussion #124 on Nov 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions