Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Round-trip to dir failure #1

Open
jefdaj opened this issue May 22, 2024 · 1 comment
Open

Round-trip to dir failure #1

jefdaj opened this issue May 22, 2024 · 1 comment

Comments

@jefdaj
Copy link
Owner

jefdaj commented May 22, 2024

Possibly related to unicode encoding and/or an ext4 filesystem issue?

Can reproduce in stack repl:

writeTestTreeDir "issue01example1_before" issue01example1
after <- buildProdTree False [] "./issue01example1_before"
diff (dropFileData issue01example1) after

Examples of failing test trees:

issue01example1 :: TestTree
issue01example1 =
  Dir 
    { name = Name "\xf58e6\x1057cc"
    , hash = Hash
        { unHash = "NjAxYWM0OTY1M2RkOGNm" }
    , contents =
        [ Dir 
            { name = Name "𧊯"
            , hash = Hash
                { unHash = "NWQxZTY4ZGRlNmFmNTRj" }
            , contents =
                [ File
                    { name = Name "Ԉ" 
                    , hash = Hash
                        { unHash = "ZTNiMGM0NDI5OGZjMWMx" }
                    , fileData = ""
                    }
                , File
                    { name = Name "쿏]"
                    , hash = Hash
                        { unHash = "YjdkMjUyOTZlN2JjNmE2" }
                    , fileData = "Û" 
                    }
                ]
            , nFiles = 2 
            }
        ]
    , nFiles = 2 
    }   

issue01example2 :: TestTree
issue01example2 =
  Dir
    { name = Name "\xf6847"
    , hash = Hash
        { unHash = "ODkzNTQzYjU1MjljNWFh" }
    , contents =
        [ Dir
            { name = Name "*\xfc5a1-"
            , hash = Hash
                { unHash = "OTkxNjI4OWVhNjUyYmE0" }
            , contents =
                [ File
                    { name = Name "🮡"
                    , hash = Hash
                        { unHash = "ZTNiMGM0NDI5OGZjMWMx" }
                    , fileData = ""
                    }
                , File
                    { name = Name "\xfec76_"
                    , hash = Hash
                        { unHash = "ZDA3NTJiNjBhZGIxNDhj" }
                    , fileData = "ç"
                    }
                ]
            , nFiles = 2
            }
        ]
    , nFiles = 2
    }
@jefdaj
Copy link
Owner Author

jefdaj commented May 30, 2024

I suspect this might only be an issue with reading/showing the filenames in the tests themselves. Will investigate more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant