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

Test suite fails on Windows #6449

Closed
brayniverse opened this issue Sep 7, 2021 · 6 comments · Fixed by #10749
Closed

Test suite fails on Windows #6449

brayniverse opened this issue Sep 7, 2021 · 6 comments · Fixed by #10749

Comments

@brayniverse
Copy link

brayniverse commented Sep 7, 2021

I ran the test suite on Windows 10 using PHP 8.0 while working on #6418 and encountered the following errors.

image
image

@weirdan said this about the errors:

One appears to be symlink related (who knew Win can do symlinks?) and the other looks like composer internal issue, but this will need to be investigated further.

I'm not sure how to go about helping to solve these errors but if you need any more information I'm happy to help.

@orklah
Copy link
Collaborator

orklah commented Sep 7, 2021

I can confirm the symlink test fail on windows and PHP 8.0. However, the composer one is working on my end. It's probably due to how composer is installed on your machine.

I wonder what makes the symlink test pass on CI though...

@weirdan
Copy link
Collaborator

weirdan commented Sep 7, 2021

That test is skipped based on some conditions that are not immediately obvious to me. Perhaps it never runs in GH CI.

@orklah
Copy link
Collaborator

orklah commented Sep 7, 2021

That test is skipped based on some conditions that are not immediately obvious to me.

The test seems ready to accept a specific error

symlink(): Cannot create symlink, error code(1314)

but what I get when I run the test is

unlink(C:...\psalm\tests/fixtures/symlinktest/ignored/b): No such file or directory

and

symlink(): Permission denied

seems like the CI either fail the way it's intended or succeed so this is not an issue. Maybe we should just skip the whole test on windows...

@weirdan
Copy link
Collaborator

weirdan commented Sep 7, 2021

Maybe we should just skip the whole test on windows...

My thoughts exactly. Symlinks on NTFS, while technically possible, are a quite exotic feature known by a few and requiring elevated permissions (last time I checked, which is quite a while ago).

@orklah
Copy link
Collaborator

orklah commented Sep 7, 2021

ideally, we should maybe skip the other one with composer if we detect composer is not installed in standard way. This way contributors on windows would have a working test suite

@weirdan
Copy link
Collaborator

weirdan commented Feb 25, 2024

The composer issue was fixed in 1.10: composer/composer#9076

weirdan added a commit to weirdan/psalm that referenced this issue Feb 25, 2024
Fixes vimeo#6449

Symlinks on Windows are rare (and quite unreliable)
weirdan added a commit to weirdan/psalm that referenced this issue Feb 25, 2024
Fixes vimeo#6449

Symlinks on Windows are rare (and quite unreliable)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants