Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Haxe 4 #153

Open
markknol opened this issue Oct 29, 2019 · 15 comments
Open

Haxe 4 #153

markknol opened this issue Oct 29, 2019 · 15 comments

Comments

@markknol
Copy link
Contributor

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

@markknol
Copy link
Contributor Author

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

Bonus points for using the ES6 output

@clemos
Copy link
Owner

clemos commented Jan 24, 2020

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

@markknol
Copy link
Contributor Author

I asked around and:

  • There's only a single breaking syntax change I'm aware of (multi type parameter constraints)
  • All examples should work except except stuff that uses haxe.unit / Fast / remoting / web dispatch. those are all out of std and moved into hx3compat. So maybe it could be an idea to add hx3compat library as option if thats not too much hazzle.

So in theory it should be fairly safe.

@back2dos
Copy link

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

@markknol
Copy link
Contributor Author

markknol commented Jun 2, 2020

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
Copy link
Owner

clemos commented Jun 2, 2020

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

@markknol
Copy link
Contributor Author

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

@clemos
Copy link
Owner

clemos commented Dec 19, 2020

Hi @markknol
Sorry, it was just that I had other things going 😭
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 😅
Do you have any clue ?

@clemos
Copy link
Owner

clemos commented Dec 19, 2020

I have tried installing opam to compile haxe from sources but opam has the same weird behaviour 👀 🤷

@AlexHaxe
Copy link

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
Copy link

RblSb commented Dec 25, 2020

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
Copy link

AlexHaxe commented Dec 25, 2020

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):

  • adding support for HTTPS through let's encrypt
  • update external JS-libs (lib folder and index.html)
  • make a Haxe 4 powered version
  • consider using lix for project itself and maybe even for try snippets
  • migration of old try snippets

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
Copy link

@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
Copy link

RblSb commented Jan 1, 2021

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

  • Not sure what i can do for https in project, never actually setup ssl for myself.
  • Starting to investigate frontend libs update, but not sure about try-haxe libs. I think would be better to add way to download any lib from haxelib, that will be cached in something like stack.json file and ~200 mb haxelib folder limit. Should be easier to mantain? And libs with external js dependencies can be supported later.
  • About migration: would be good to get archive with several /uid/ projects of original try haxe to test backward compatibility, with and without simple library usage.

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
Copy link

AlexHaxe commented Jan 1, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants