idris-lang / Idris2

A purely functional programming language with first class types
https://idris-lang.org/
Other
2.49k stars 373 forks source link

Node is missing some FFI functions from base #2207

Open Z-snails opened 2 years ago

Z-snails commented 2 years ago

If possible, please include complete self contained source files (for example by uploading to https://gist.github.com) that exhibit the issue in addition to quoting from them here. The smaller the example the better!

Steps to Reproduce

Try to compile various System.* functions with node codegen

Expected Behavior

Works

Observed Behavior

Fails with

Uncaught error: INTERNAL ERROR: No supported backend found in the definition of System.Errno.prim__getErrno. Supported backends: "node","javascript". Backends in definition: "C".

Here's every FFI function in base that's missing a node version if someone wants to implement these:

iamrecursion commented 2 years ago

I just ran into this when attempting to compile idris2 for javascript. In my case it was prim__os that is missing, and I don't see it on the list above. Would you be able to add it?

Ignore me. I see that prim__os isn't supported on JavaScript, and so idris2 can't be compiled for it.

ProofOfKeags commented 2 years ago

2427 completed Data.Buffer and System.Directory. Let's check those off :)

Z-snails commented 1 year ago

System.Clock added by #2829

Z-snails commented 1 year ago

popen/pclose added by #2866

dunhamsteve commented 1 year ago

I added free in #2606

freddi301 commented 1 year ago

I'm implementing some here https://github.com/idris-lang/Idris2/pull/2981

Feel free to copy paste over