build.sbt should do Unsupported Platform test
Arman,
Under the rubric of "moving errors closer to the application developer", what do you
think about build.sbt doing the "UnsupportedPlatform" check.
Confessing my limitations in public again, I could not figure out that the linktime missing symbol for "UnsupportedPlatformException" currently expected & wanted in the 'main' branch when running on macOS actually meant "Not Yet on this platform".
I have not tried it yet, but, given encouragement, I could.
- Have build.sbt check the System property "os.name"
- do the downcasing to compare to Linux or macOS.
- Have sbt itself throw a RunTimeException("Lee you are at it again!")
That gives pretty immediate feedback, which needs little sussing out.
Thanks for raising this. I agree, the unsupported platform error could be a lot clearer in meaning. A couple thoughts:
-
When I proposed the
UnsupportedPlatformError, I actually was not thinking about an epollcat developer. I was thinking about an application developer, who is using epollcat as a library. In which case, no matter what we do in ourbuild.sbt, it will not help them. -
Although our
build.sbtcan warn if it is being run on an unsupported platform, I do not think it should throw a fatal error. There is no reason someone cannot develop epollcat on a non-supported platform: after all, to run the scala compiler you need only a JDK. They won't be able to run tests locally, but CI assumes much of that responsibility anyway. It's far from ideal, but I do not want to rule this out.