sbt / io

IO module for sbt
Apache License 2.0
40 stars 45 forks source link

use regular stat() instead of non-standard __xstat64 abi #362

Closed bratkartoffel closed 8 months ago

bratkartoffel commented 8 months ago

This should fix sbt/sbt#7455

@eed3si9n

Disclaimer: I'm not a scala developer, nor have I experience with JNA. I'd be glad if someone else could verify / review this thoroughly.

bratkartoffel commented 8 months ago

I've made a silly typo, so I had to amend & force push again, sorry

bratkartoffel commented 8 months ago

The mimaReportBinaryIssues fails as the abi calls changed. How can I fix this?

eed3si9n commented 8 months ago

Plz add

exclude[DirectMissingMethodProblem]("sbt.internal.io.Linux32.*"),
exclude[ReversedMissingMethodProblem]("sbt.internal.io.Linux32.*"),
exclude[DirectMissingMethodProblem]("sbt.internal.io.Linux64.*"),
exclude[ReversedMissingMethodProblem]("sbt.internal.io.Linux64.*"),

around https://github.com/sbt/io/blob/develop/build.sbt#L136

bratkartoffel commented 8 months ago

After digging a bit, i stumbled accross #211 (Native Milli code no longer necessary on JDK10 or greater)

As mentioned in the description, the whole code was added due to a bug in the JVM. The underlying issue was not only fixed for Java 10 (as stated in the PR description), but also backported to Java 8u301. So I think, this whole stuff is no longer needed at all.

See also https://www.oracle.com/java/technologies/javase/8u301-relnotes.html

eed3si9n commented 8 months ago

but also backported to Java 8u301

I didn't know that. I'd be happy to see this whole thing dropped. https://github.com/sbt/io/blob/develop/io/src/main/scala/sbt/io/JavaMilli.scala is public, but the rest of internal stuff can probably go.

bratkartoffel commented 8 months ago

I'd be glad to help, but this is far beyond my scala knowledge. Maybe just merge this MR as a "hotfix" and drop the whole stuff later?