clemos / try-haxe

A small webapp that allows to test Haxe online
https://try.haxe.org
MIT License
126 stars 41 forks source link

Haxe 4 #153

Open markknol opened 4 years ago

markknol commented 4 years ago

Would be great if Haxe 4 can be used on try-haxe!

markknol commented 4 years ago

Any news on this, would be great if we could use Haxe4

Bonus points for using the ES6 output

clemos commented 4 years ago

I'll look into it when I have time :S Do you think the examples will still work :sob: ? :smile:

markknol commented 4 years ago

I asked around and:

So in theory it should be fairly safe.

back2dos commented 4 years ago

The tink libraries will also require an update. Is there a way to dump the data? Then I can try locally ;)

markknol commented 4 years ago

Any news on this? Would be great to have this have little bump, since the unofficial try-haxe kinda died (which did support Haxe 4).

Do you think the examples will still work 😭 ? 😄 Yes, with exception of the "Unit testing", since that package has moved to hx3compat library.

If you are worried about old snippets won't run anymore, we maybe need a option to compile with Haxe 3, where all current snippets will use that Haxe version, and from that day on, default option will be Haxe 4 (or something).

clemos commented 4 years ago

Hi ! Sorry I haven't had the time to upgrade yet, but I may have a bit more time in the coming days :grimacing: I doubt I'll have the motivation to provide multiple Haxe version support, though. Best

markknol commented 3 years ago

Any change you can update this to Haxe 4? Do you need some help on anything? What's blocking you?

clemos commented 3 years ago

Hi @markknol Sorry, it was just that I had other things going :sob: Anyway, I'm in the process of upgrading to haxe4, I have downloaded the latest release at https://github.com/HaxeFoundation/haxe/releases/download/4.1.4/haxe-4.1.4-linux64.tar.gz, but now running the downloaded haxe fails with:

No such file or directory

Obviously the binary is there, but it seems to try and access a resource that doesn't exists. I know I have had this error when upgrading haxe in try-haxe before, but unfortunately I forgot what it was about and how to solve it :sweat_smile: Do you have any clue ?

clemos commented 3 years ago

I have tried installing opam to compile haxe from sources but opam has the same weird behaviour :eyes: :shrug:

AlexHaxe commented 3 years ago

I am trying to find the right place to discuss and coordinate getting try-haxe Haxe 4 ready. so why not here.

someone told me that @rblsb already has a Haxe 4 version up and running (probably local machine only), but is looking for a server to host it on. I am unaware of @clemos' hosting options / plans.

I do however have access to Haxe's benchmark server which is already set up to install the latest haxe nightlies (via lix) and can even compile Haxe versions from PRs or branches (of course it constantly runs benchmarks, one at a time, and we will have to see how well they work together). that should solve potential hosting and compilation issues.

so what does it take to bring all three of us together to get something going? is there a version of a Haxe 4 enabled try-haxe around that I can throw on the server to see if it would work? or are you planning on using your existing server(s)?

RblSb commented 3 years ago

Hello, sorry for delay, worked on this latest days. It was very hard for me without proper debugging and php/docker experience, but i think i fixed things and make it more maintainable: https://github.com/RblSb/try-haxe Check readme for simple setup. It's uses fork from @mrcdk, but with disabled sub-docker support (doesn't work for reason "error 126", as docker in docker says to me). So, macro support should be disabled again for safety, i guess, or someone can try to make it work again. Also have code to compile this project with Haxe 4, but at this point probably would be better to check if everything works as before. Will make separate branch for this soon. Improvements for container and development setup are welcome.

AlexHaxe commented 3 years ago

thanks @rblsb I've looked at your version and installed it on benchhmark server to see if it would work. I could sucessfully run it, even with runHaxeDocker (which I assume is what you had trouble with). I think that's something that we could work with.

there are a few things (probably incomplete list) that should be addressed when using rblsb's version (some sooner, some later):

I think HTTPS and migration of old snippets should be on top of our list. although I'm not really sure if snippets can be transfered.

a Haxe 4 compiled app should also be a higher priority, given that it's supposed to be an official Haxe tool, so it should at least use latest Haxe 4.1 for it's own code (currently it says 3.4.4 which is what's in the distro's Haxe package).

for jquery, bootstrap, codemirror, etc. we should probably use fresher versions simply from a security viewpoint, we probably don't have to address it immediately.

using lix for app and snippets is probably nice to have and would make managing dependencies easier. I'm not yet overly familiar with all aspects of try-haxe, so I'm not entirely sure what that would entail and how useful it would turn out to be. maybe @back2dos has some ideas on that.

either way (with or without lix) when we update library versions old snippets might break, so technically lib versions would have to be persisted for each snippet. but maybe I'm overthinking that and nobody expects snippets to work after a few weeks.

AlexHaxe commented 3 years ago

@clemos since you haven't spoken I assume you are busy with projects or on holiday. nevertheless I would like to hear your take on the future of try-haxe4. do you plan to continue using your branch and existing servers? are there any plans of dockerising your version or merging of a dockerised branch (either mrcdk's or rblsb's version) to enable macro support? do you even want help setting something up? if so tell us what you need.

disclaimer: I'm not speaking in any official capacity although I volunteered for an official mission to make Haxe 4 powered try-haxe happen. I do have permission to offer Haxe Foundation's benchmark server as a possible hosting option if that removes any blockages.

RblSb commented 3 years ago

Pushed Haxe 4 codebase. Now you can compile stuff outside of container with Haxe 4.1 and just refresh the page. About list:

And about docker in docker - what do you changed to make it work? I'm interested to see PR about that, but if this only works on linux host - then that's not a option, i guess.

AlexHaxe commented 3 years ago

I see you had a similar idea concerning folder structure. I'll try to come up with a pull request with my changes.

I think we can add SSL from outside of try-haxe container by using a proxy that handles SSL and connects to a local docker instance.

docker in docker works, it requires some manual setup. compilation times take 3+ seconds, so it's not super fast. I only tried on Linux systems, no idea what Mac or Windows would make of it.