apache / pekko-http

The Streaming-first HTTP server/module of Apache Pekko
https://pekko.apache.org/
Apache License 2.0
149 stars 36 forks source link

support Windows build #446

Open pjfanning opened 7 months ago

pjfanning commented 7 months ago

Unfortunately, the existing build and tests are based on Linux and this works well for Posix users (Mac, Unix, Linux, etc). Our CI only runs on ubuntu VMs. This can be said of basically all Pekko builds.

Windows users may or may not be able to build this project as is. We have no proof about this. Even if they could build it, some tests might fail.

Unfortunately, CI on Windows VMs can be time consuming to set up and in my experience can often be more brittle.

Windows users do have the choice to use https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux or to use solutions like dual boot, build VMs on Cloud Providers and Docker Containers.

Supporting Windows would be nice but we probably need Windows users to drive this.

samueleresca commented 7 months ago

I'm a Windows 11 user, but I usually dev in a ubuntu instance running on WSL. I tried to clone the project on the Windows host system (not WSL) and give it a go:

3 tests are failing:

I'm trying to see if I can understand the root cause of these failures.

pjfanning commented 7 months ago

thanks @samueleresca - with the new FileAndResourceDirectivesSymlinkSpec, do you know if the older copy of the test, (before #445) that was in FileAndResourceDirectivesSpec, passed? In the end of the day. we can probably treat this as something to worry about after the pekko-http 1.0.1 release but we can wait a few days to see if we can make progress on the Windows build.

samueleresca commented 7 months ago

The should not follow symbolic links to find a file test fails both on main and in the pjfanning:rework-symlink-test branch for 2 different reasons:

main

[info] - should not follow symbolic links to find a file *** FAILED *** (3 seconds, 21 milliseconds)
[info]   java.lang.AssertionError: timeout (3 seconds) waiting for 1 messages on WarningFilter(None,Right(.* points to a location that is not part of .*),false)
[info]   at org.apache.pekko.testkit.EventFilter.intercept(TestEventListener.scala:132)
[info]   at org.apache.pekko.http.scaladsl.server.directives.FileAndResourceDirectivesSpec.$anonfun$new$41(FileAndResourceDirectivesSpec.scala:214)

rework-symlink-test

 org.apache.pekko.http.scaladsl.server.directives.FileAndResourceDirectivesSymlinkSpec *** ABORTED *** (59 milliseconds)
[info]   java.nio.file.FileSystemException: C:\Users\SAMUEL~1\AppData\Local\Temp\pekko-http-symlink-test8189405977971527262\dirWithLink\linked-dir: A required privilege is not held by the client.

The error in rework-symlink-test seems requiring some settings change in my system.

samueleresca commented 7 months ago

I agree we should proceed with the release