Open mio-19 opened 1 month ago
This seems like a problem with your graal confifg, not with os-lib. We can't change everything to lazy vals to satisfy graal
How about make it a def like https://github.com/com-lihaoyi/os-lib/pull/239?
I'd like a deeper investigation before we make another change. Graal has to support cases like this. Static val
s that require environmental data during initialization are not rare.
If not, I'd like a link to the upstream ticker and discussion in the graal issue tracker before we make any further changes in OS-Lib
One option is to provide native image configuration in META-INF, like what some popular java libraries did
I'm not an expert in graal, so you will need to present the problem space and potential solutions
I built my scala program with GraalVM and class init at build time. From the error message I find that os.pwd0 is defined as a
val
, which was probably calculated by GraalVM compiler at build time, which leads to unexpected behaviour.