Hi grump, it's a pleasure seeing you around again. You've been missed.
Thanks for providing the repository. I have uploaded it to Codeberg at
https://codeberg.org/pgimeno/nativefs
grump wrote: ↑Sat Jul 09, 2022 9:51 am
That mirror broke many tests because someone decided to replace all LF characters with CR/LF in all files (including the test data files), and there was also code added but no tests written or adapted to the changed code. The tests were ignored and they are useless now.
I've committed a change for the test data files which will hopefully make this not an issue anymore in future, by adjusting .gitattributes and normalizing the line endings. Maybe instead of text with specific line endings, I should have made the files binary, but well, it was hard to tell which was the correct decision.
grump wrote: ↑Sat Jul 09, 2022 9:51 am
I haven't investigated the cause, but maybe NativeFS doesn't like statically linked executables.
Yeah, the PhysFS ffi imports will only work with .so/.dll linkage.
Now here's the weird thing.
- Most tests fail unless run from inside the test directory. I did not know that and ran them from the root of the repo, causing lots of failures.
- A dynamic version of 11.3 passes all tests (in your repo, not in the clone).
- A static version of 11.3 fails many tests with one of these errors:
"../nativefs.lua:351: /usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2: undefined symbol: PHYSFS_getMountPoint"
"../nativefs.lua:248: /usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2: undefined symbol: PHYSFS_mount"
That's probably what Ross was experiencing.
- Either a dynamic or static version of 11.4 (doesn't seem to matter) passes all tests but one:
Code: Select all
Started on Sat Jul 9 14:02:29 2022
test_File_flush ... Ok
test_File_isEOF ... Ok
test_File_lines ... Ok
test_File_open ... Ok
test_File_read ... Ok
test_File_seek ... Ok
test_File_setBuffer ... Ok
test_File_tell ... Ok
test_File_write ... Ok
test_fs_append ... Ok
test_fs_createDirectory ... Ok
test_fs_getDirectoryItems ... Ok
test_fs_getDirectoryItemsInfo ... Ok
test_fs_getDriveList ... Ok
test_fs_getInfo ... Ok
test_fs_lines ... Ok
test_fs_load ... Ok
test_fs_mount ... Ok
test_fs_newFile ... Ok
test_fs_newFileData ... Ok
test_fs_read ... FAIL
main.lua:77: expected: 446, actual: nil
test_fs_remove ... Ok
test_fs_setWorkingDirectory ... Ok
test_fs_write ... Ok
test_xxx_globalsCheck ... Ok
I haven't investigated the failure yet, I've got a lot on my plate at this moment.
It's a possibility that the fact that a static 11.4 build finds PhysFS, unlike 11.3, has to do with me having used cmake instead of autotools for building, but I'm not sure what I actually used for each of the builds so I can't be sure.
grump wrote: ↑Sat Jul 09, 2022 9:51 am
Here's my latest local copy of the lib, with all tests still passing, including git history in case someone wants to put up a proper repo.
Thanks a lot for providing it. You had other valuable repositories and I wonder if it would be possible for you to provide them. I only have cindy and moonvox, both of which I could put online but it appears there were more - I didn't even know about nativefs. It's OK if you wanted to stop maintaining them, but you could just have archived them instead of deleting them. It's been a great loss.
grump wrote: ↑Sat Jul 09, 2022 9:51 am
P.S.: In retrospect, test_fs_lines() should not use main.lua as its test corpus, because it assumes LF line endings in test/main.lua. That's a bogus assumption (line endings in code can change inadvertently when mixing OSs) that should be fixed by the potential new maintainer, if they care about tests passing.
I'll look into that.