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

BagItTools does not perform on Windows (in CI) #47

Closed
whikloj opened this issue Jun 25, 2022 · 13 comments
Closed

BagItTools does not perform on Windows (in CI) #47

whikloj opened this issue Jun 25, 2022 · 13 comments

Comments

@whikloj
Copy link
Owner

whikloj commented Jun 25, 2022

There are several tests that do not pass when run under Windows, this could be intricacies in Windows on Github Actions or it could be failures of the code.

This ticket is serve as notice that there are currently no guarantees if you want to use this library under PHP on Windows. Currently I'd recommend the Windows Subsystem for Linux.

https://github.com/whikloj/BagItTools/runs/7055596694?check_suite_focus=true

pinging @jonasraoni

@jonasraoni
Copy link
Contributor

Hmm, AFAICS there were few OS specific things that could break the code, the only thing that comes to my mind would be the PHP_EOL, all the tests, with the exception of the fetch one, worked fine on my Windows box after I removed those files with "bad" names.
Thanks for warning, I'll investigate once I get some free time here =]

@whikloj
Copy link
Owner Author

whikloj commented Jun 25, 2022

Yeah, I remember from a Java project that setting up Github Actions under Windows required some special tweaks, so it might not be the code but until I can resolve them I wanted to draw attention to it.

@jonasraoni
Copy link
Contributor

Update: I know that at least one user used the updated package in Windows and it worked fine.

@whikloj
Copy link
Owner Author

whikloj commented Jul 4, 2022

That is good, but unfortunately I still can't check that any of my future changes doesn't break Windows compatibility until I can get the tests to run under Windows.

@jonasraoni
Copy link
Contributor

I'll have some free time this weekend, so I'll try to check these issues :)
On a first sight it looks like it's related to line-breaks (e.g. checksums using \n while the code is using PHP_EOL, which will end up as \r\n on Windows).

@whikloj
Copy link
Owner Author

whikloj commented Jul 30, 2022

I've done some work on standardizing the path separators and some other changes here https://github.com/whikloj/BagItTools/tree/minor-cleanup

@jonasraoni
Copy link
Contributor

Great, I'll move to there :)

@whikloj
Copy link
Owner Author

whikloj commented Aug 1, 2022

Hey @jonasraoni I am still getting 2 failures on the Windows test in Github Actions. Both are related to Tar Bzip files. It appears that the Tar Gzip tests work fine. So I am wondering if there is a) a problem with bzip under Windows or b) some special setup necessary?

@whikloj
Copy link
Owner Author

whikloj commented Aug 1, 2022

@whikloj
Copy link
Owner Author

whikloj commented Aug 2, 2022

Actually, it appears as if its more than 2 failing tests.
https://github.com/whikloj/BagItTools/runs/7622196030?check_suite_focus=true

@jonasraoni
Copy link
Contributor

I just got a fresh branch in my machine, reinstalled the packages and no signal of errors.

Looks like it's something on the GitHub action, I've enabled it on my account (and I see the same errors now), so I'll try to debug later 😁

@whikloj
Copy link
Owner Author

whikloj commented Aug 2, 2022

Partially resolved by #51, waiting on donatj/mock-webserver#42

@whikloj
Copy link
Owner Author

whikloj commented Nov 25, 2022

Now resolved with b2ccb77 🎉

@whikloj whikloj closed this as completed Nov 25, 2022
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

2 participants