hxnodejs icon indicating copy to clipboard operation
hxnodejs copied to clipboard

Does hxnodejs cause the compiler to define the 'sys' define?

Open kevinresol opened this issue 9 years ago • 8 comments

Or should it?

kevinresol avatar Feb 22 '16 03:02 kevinresol

It does allow the sys package: https://github.com/HaxeFoundation/hxnodejs/blob/master/extraParams.hxml

I don't know if it can actually add -D sys because that's a reserved flag. We might have to find a solution for that.

Simn avatar Feb 22 '16 08:02 Simn

Yeah but some lib/code depends on the sys define. When the sys-related api are complete (e.g. Sys.stdout()), I think the compiler should define sys for us.

Tried -D sys and it complains that I can't set it manually.

kevinresol avatar Feb 22 '16 09:02 kevinresol

I don't know if it can actually add -D sys because that's a reserved flag. We might have to find a solution for that.

Is it possible to hardcode inside the compiler, defining sys when it sees the hxnodejs lib is included?

kevinresol avatar Jun 06 '16 08:06 kevinresol

But hxnodejs doesn't implement full sys api (because it's impossible without dirty tricks (#64). It just implements some of it, so I don't know if it's reasonable to define sys...

nadako avatar Jun 06 '16 09:06 nadako

@nadako maybe make a checklist of them and see what we can do.

kevinresol avatar Jun 06 '16 09:06 kevinresol

the main problem is that we can't implement synchronous API that are used in sys, like Sys.stdout().

nadako avatar Jun 06 '16 09:06 nadako

Will this work? http://stackoverflow.com/a/6471170/3212365

kevinresol avatar Jun 06 '16 10:06 kevinresol

Hmm, I don't know. Will have to look into it, not sure if that'll work everywhere. Thanks for the hint!

nadako avatar Jun 06 '16 10:06 nadako