#haxeget: the easier way to install and manage Haxe compiler versions

1 messages Β· Page 1 of 1 (latest)

misty leaf
barren bloom
#

Now with Windows support πŸ™ƒ

misty leaf
#

I was gonna make an announcement here lol, just was working on a short gif lol

misty leaf
barren bloom
misty leaf
#

Ah, do you have a powershell script already made?

barren bloom
misty leaf
#

Oh okay, what would be the best way to run a powershell script from a url?

#

Can you even do that? Only thing I know about powershell is that it is object-oriented or something

barren bloom
#

Oh, I've never worked with powershell scripts. I'll try something tomorrow

misty leaf
#

πŸ‘

cedar iris
#

you've created a conflict for me logo

#

dang it

#

haxe projects
rust
buuuut it's for haxe
...alright

#

i think it looks super cool tho

#

it's nice that it works for all platforms

misty leaf
#

confusion is good!

cedar iris
#

that's how the enemies attack!

dim field
#

now rewrite it in haxe then compile to rust with custom reflaxe target

misty leaf
#

i wonder if that is even possible

minor ibex
#

how does it deal with IDEs locking files? (like haxe.exe)... does it / can it also pull neko / hl... seems super nice πŸ₯³

misty leaf
#

Not really sure what you mean by the former?

#

All haxeget does is make a symlink to a directory added to your path

minor ibex
misty leaf
#

nope

misty leaf
#

Hmm, I wonder if ceramic support could be added

#

Since ceramic packages their own version of haxe

cedar iris
#

that would be kinda neat for linux peeps

misty leaf
#

Why not windows?

cedar iris
#

windows as well, but, the windows ceramic way doesn't have much issues

#

with linux i recall having issues but can't remember what they are now

#

oh wait i don't think ceramic versions itself via its manager

misty leaf
#

how tf does haxeget already have 1000 loc

cedar iris
#

🌈 rust 🌈

misty leaf
#

lmao probably

cedar iris
#

if i wrote it tho, it'd probably be more

#

cause i'd defo make it ecs πŸ˜„

misty leaf
#

to be fair, the ceramic haxelib is about ~470 loc

#

kinda verbose

delicate jacinth
#

πŸ‘€

misty leaf
#

wow, that was fast

misty leaf
#

I need a better name for the cache_directory, which is located in ~/.haxeget on macos and other places on other platforms. It holds all of the compiler versions, some files that store the names of the installed versions, etc etc

misty leaf
#

@barren bloom On windows, is there a guarantee that C:\\ will always exist?

misty leaf
#

Haven't created a release yet as I want to add a few things before, but haxeget can now update itself haxeget install haxeget

#

might move it to haxeget update

barren bloom
barren bloom
misty leaf
#

I think nightly should stay the same?

#

I want to make haxeget update without any arguments

novel peak
misty leaf
misty leaf
#

maybe "stash"

#

@delicate jacinth Hey, for ceramic all I would need to do is add tools to path, right?

delicate jacinth
misty leaf
delicate jacinth
#

Ah, Ceramic is designed to be like this anyway. If you download a release zip on Ceramic's github, it has everything. There is the ./ceramic link command that takes care of creating the symlinks already, but adding the tools path to PATH should work too

misty leaf
#

How do you make sure it doesn't conflict?

delicate jacinth
#

on windows it cheats a little bit as it just adds ceramic command in HaxeToolkit dir, which is assumed to be in PATH already 😬

misty leaf
#

Ah, so as long as I symlink the ceramic in the path, it will be good?

delicate jacinth
#

It will not expose haxe to the machine, but yeah, ceramic command should work

misty leaf
#

and on windows, it is ceramic.cmd that needs to be linked?

delicate jacinth
#

@misty leaf You can take a look at the ceramic link code: https://github.com/ceramic-engine/ceramic/blob/master/tools/src/tools/tasks/Link.hx

On windows it creates a ceramic.cmd file in HaxeToolkit dir that calls the ceramic.cmd command located in ceramic's tool dir

GitHub

Cross-platform 2D framework written in Haxe that can export natively to desktop (windows, mac, linux), mobile (ios, android), web (js + webgl) and to unity projects - ceramic-engine/ceramic

misty leaf
#

zsh: /Users/logo/.haxeget//ceramic: bad interpreter: ../node/node_modules/.bin/node: no such file or directory

#

gotta make my own file now I suppose

#

i'll do this tomorrow lol

#

pushed what I have right now

misty leaf
#

@barren bloom Thanks for the PR by the way

misty leaf
#

@barren bloom Would you have any idea on why I get this error?

#
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value:
   0: No such file or directory (os error 2)

Location:
   src/cache_directory.rs:46
#

been kinda stuck on it

#

it seems to download correctly

misty leaf
#

@little rune Closed your error

little rune
#

Neat!

pulsar jolt
#

(for some reason you can do that in apt)

misty leaf
#

zvm does zvm uninstall self

#

which is def a thing

cedar iris
#

Feature request: Make it possible for me to manage ceramic haxe version πŸ˜„

delicate jacinth
#

Joke aside, I guess that can be done with a script : download correct haxe version from haxe.org, unzip, put in the correct place

#

(but you are on your own if things break)

misty leaf
#

yeah, if anything that should be an option that you can pass in to ceramic

cedar iris
delicate jacinth
# cedar iris I do understand the value of locking haxe versions, I'm not against it or anythi...

The main reason is that allowing any version of haxe makes it more difficult to identify bugs. Like somebody reports an issue with Ceramic and after discussing for 20 minutes you realize it's because of some haxe version not being the same as what it has been tested for etc... I want Ceramic build process to be as predictable as possible and locking anything it depends on is helping a lot for that.

delicate jacinth
#

But not gonna lie, I'm looking forward to read your feedback on testing Ceramic over bleeding edge haxe πŸ˜‚

#

(so having a mechanism of changing haxe version of ceramic when you know what you are doing, seems fine to me)

cedar iris
#

so am i man

misty leaf
#

I kinda dislike having to depend on someone elses binaries though

cedar iris
#

i can't wait for lsp to work for me

delicate jacinth
cedar iris
#

not without lix and that's a bit iffy

delicate jacinth
#

lix is not an option for me, it's one more layer that can break and that I don't want to debug myself (and when I tried it I had issues)

cedar iris
#

yeah

#

so something like haxeget would be nice

misty leaf
#

I would make ceramic do something similar to haxeget and just download from the haxe website or github releases

#

ye

cedar iris
#

independent

delicate jacinth
#

basically I assume that if an user installs haxe, they have haxelib available, so let's use that

cedar iris
#

cause realistically it isn't hard to switch out ceramic versions, and haxe in general is pretty consistent

misty leaf
#

Oh? I thought it was a submodule?

cedar iris
#

nah, just a directory

misty leaf
#

wait so haxelib tool just downloads haxe binaries from haxe.org?

#

instead of from haxe-binaries or whatever you call it

cedar iris
#

yeah, it's just an extracted binary folder

#

called haxe-binaries

misty leaf
#

i thought it just used this?

delicate jacinth
#

yeah it does

#

everything is packed in the github release archive

#

what I mean is that the utility from haxelib just downloads and unpack that archive and links it

misty leaf
#

ah ok, that is what i originally thought

delicate jacinth
#

Again, the idea is to have Ceramic self-contained and be reliable and less dependent on all the moving parts of a computer environment

cedar iris
#

does any of this even matter for haxeget? isn't it just overwriting the directory with a new haxe binary?

misty leaf
#

haxeget would do the same as the haxelib tool

delicate jacinth
#

Anyway if you want to use a different version of haxe in ceramic, you simply have to replace the haxe folders in git/haxe-binary/

cedar iris
#

worth adding a note to the help page that the individual may want to install haxelib from haxelib using the ceramic haxelib.exe

weary shore
#

@misty leaf what if we could install/use this through haxelib? πŸ‘οΈ
haxelib get-version 4.3.3 or something

misty leaf
drowsy dragon
#

Hey @misty leaf, someone from my college told me about a friend telling him a project I forked but didn't contribute to yet, I assume that was you? lol

misty leaf
drowsy dragon
#

yup haha, I had issues with it in my M1 and wanted to contribute to the project, but then the sudden realization came in that I don't know Rust

misty leaf
#

i don't know rust either, it is okay

#

interesting that it doesn't work on M1 though? what was the error?

drowsy dragon
#

I don't remember honestly

misty leaf
#

did you compile from source or using the binaries?

drowsy dragon
#

source

#

Actually why did you choose Rust instead of Zig?

misty leaf
#

If you have any extra time, please try again: I would appreciate it. Also say hi back, I could just message on discord but I feel like we should finish the transaction.

#

Zig networking kinda sucks

#

Doesn't support TLS v1.2

#

Which might not be a problem here, but didn't want to test it lol

#

Also I wanted an excuse to try out Rust, which this successfully did. Now I have valid reasons to complain and praise it.

misty leaf
#

Rust is basically like javascript for better or worse

drowsy dragon
#

and I will try again 🫑

misty leaf
#

I was working on a podcast player with it, but that was kinda a big hurdle

#

there is a few options just not in the standard library tho

drowsy dragon
#

ah, yea, Zig is more less just a C alternative, though I think Zig could be used to make an alternat hxcpp library due to it's custom compiler for C and C++

misty leaf
#

i mean, currently it just uses clang

#

but once we get a c compiler it will be cool

drowsy dragon
#

Zig also is used as the linker driver so I think they cut out Clang

misty leaf
#

they still use clang

#

but there is another compiler called arocc but it isn't the primary one

#

not sure if it is fully integrated yet?

drowsy dragon
#

Ik they are built on top of it, and it's more less is slowly becoming it's own thing, and with arocc, it's an alternate C transpiler to Zig then compiles through Zig's llvm compiler

#

If I'm not mistaken

misty leaf
#

although i think it can compile to zig when used for translate-c?

drowsy dragon
#

oh, I'm still new to Zig have only used it for three days at the current moment

drowsy dragon
misty leaf
#

but yeah, haxeget was pretty inspired by zvm

#

which ironically is written in go

#

so there is a zig influence

minor ibex
#

im here

#

bro is cooking something in here @misty leaf

drowsy dragon
#

that the hell lmao

minor ibex
#

@misty leaf feeshy remind me of zlane

#

miss that dude

drowsy dragon
#

I have a question about haxeget, does it also manage with in development versions of Haxe 5? (For PickHaxe purposes)

misty leaf
#

haxeget install nightly

drowsy dragon
#

gotcha, thanks!

misty leaf
#

can also do neko, i think it only works on windows though?

#

i didn't add that feature

drowsy dragon
#

I can add it if you want for mac

misty leaf
#

please do, it probably deletes the .zip file too early

minor ibex
#

@lethal copper

lethal copper
# minor ibex <@415825875146375168>

Clip from 'Dune' [1984]
JosΓ© Ferrer as the Padishah Emperor Shaddam IV
Virginia Madsen as the Princess Irulan
SiΓ’n Phillips as the Bene Gesserit Reverend Mother and Imperial Truthsayer Gaius Helen Mohiam

Directed by David Lynch
Based upon the novel of the same title by Frank Herbert

β–Ά Play video
drowsy dragon
#

Also I luv third party package managers, it feels better to use for version testing

misty leaf
drowsy dragon
#

oohhhh

#

that's funny

misty leaf
#

not a haxeget invention lol

#

i should probably make a release now

#

done

#

btw it fixes it on linux too

#

ah, but it doesn't link, hm.

misty leaf
#

@mortal marten Did you ever get haxeget working?

mortal marten
#

i dont understand fully how to set it up

#

the paths thing keeps fucking with me

misty leaf
#

I don't use windows, but you should just need to add it to system variables?

mortal marten
#

1 sec

#

do i literally just add %HAXEPATH% as a system variable since thats what i did and it did nothing

misty leaf
#

Hmm, @barren bloom shouldn't this error say what you should set HAXEPATH to?

barren bloom
barren bloom
#

And make sure that system variable name is HAXEPATH, without %

mortal marten
#

ok 1 second

mortal marten
barren bloom
barren bloom
mortal marten
barren bloom
#

Oh, no, you shouldn't edit HAXEPATH var

misty leaf
#

Is there a way to automate this?

pulsar jolt
misty leaf
#

idk anything about windows lol

pulsar jolt
#

i know the python installer has an option to add itself to PATH

misty leaf
#

interesting

barren bloom
misty leaf
#

baha

pulsar jolt
#

its probably in the registry, but idk

#

i also do not use windows KEKW

mortal marten
#

wait so do i just add %HAXEPATH% here??? and leave the other haxepath unchanged?

mortal marten
#

it still comes up with that warning

pulsar jolt
#

did you restart?

mortal marten
pulsar jolt
#

after editing your envvars?

mortal marten
#

yeah

#

i have a feeling that its something really stupid that im not doing / doing which is making this not work

barren bloom
mortal marten
#

or that its stupidly simple to most people and i just cant get it 😭

pulsar jolt
#

well restart anyways

barren bloom
#

And restart command prompt

mortal marten
#

from this to the .haxeget folder?

barren bloom
mortal marten
misty leaf
#

i assume it would be C:\.haxeget\haxe?

mortal marten
#

its a shortcut that

#

just

#

comes up with this

misty leaf
#

seems like it is in your home dir

#

idk what the equivalent is on windows

#

here is how we create it directory_path.push_str((home_dir + ".haxeget").as_str());

#

ah k, home_dir is you windows system drive

mortal marten
#

is this even

misty leaf
#

what is inside the .haxeget dir?

mortal marten
barren bloom
#

It should be C:\.haxeget\haxe

mortal marten
#

doesnt work

#

since

#

the haxe folder is just a shortcut

barren bloom
#

It works for me, lol

mortal marten
#

which leads to the zip files

#

although now the warning is gone so

#

i think it just has to do with it being zipped or smthn

barren bloom
#

It should target unziped folder...

mortal marten
#

or well it does

#

but

barren bloom
#

Looks like somebody broke that

mortal marten
#

their names are scrambled

misty leaf
#

i think the last windows changes were by ninjamuffin

#

i don't think i did anything related there

misty leaf
#
    // windows
    #[cfg(any(windows, doc))]
    if from == "std" {
        std::os::windows::fs::symlink_dir(
            format!("{}\\bin\\{version}\\{from}", cache.location),
            format!("{}\\{to}", cache.location),
        )
        .wrap_err(format!(
            "I was unable to create a symlink from {0}\\bin\\{version} to {0}\\{from}",
            cache.current_version()
        ))?;
    } else {
        std::os::windows::fs::symlink_dir(
            format!("{}\\bin\\{version}", cache.location),
            format!("{}\\{to}", cache.location),
        )
        .wrap_err(format!(
            "I was unable to create a symlink from {0}\\bin\\{version} to {0}\\{from}",
            cache.current_version()
        ))?;
    }
misty leaf
#

ah "Probably broke something"

barren bloom
#

Well, looks like new pr from me with fix and automatization πŸ™‚

misty leaf
#

lol, sorry!

barren bloom
misty leaf
#

@barren bloom I am not afraid of unsafe {} lmao

#

(not sure if it is worth it tho)

barren bloom
misty leaf
#

rust std library is so bad istg

#

is there a crate that does it?

barren bloom
misty leaf
barren bloom
misty leaf
#

huh

#

maybe something to do with the cargo install method?

barren bloom
#

I don't know how it works, maybe that is good idea

#

Can it be outdated or something like that?

misty leaf
#

cargo version is up to date

misty leaf
#

@torn inlet

torn inlet
#

Hello, i wanted to test the new release that should fix the windows enviroment apply (https://github.com/l0go/haxeget/commit/ffa8b6821e113a851f792b4c24e6299423703b6d) and it just dies on i think the unzipping of the haxe folder judjing on the file (it's C:\Users<user>.cargo\registry\src\index.crates.io-6f17d22bba15001f\haxeget-0.3.1\src\cache_directory.rs:255) and this is the full error:

The application panicked (crashed).
Message: called Result::unwrap() on an Err value: Os { code: 2, kind: NotFound, message: "can't find the specified file." }
Location: C:\Users\fisso.cargo\registry\src\index.crates.io-6f17d22bba15001f\haxeget-0.3.1\src\cache_directory.rs:255

barren bloom
#

Looks like cargo install method is too broken

misty leaf
#

later on i will remove it from the readme

mortal marten
#

not work on windows

pulsar jolt
misty leaf
#

pushed that lol

mortal marten
pulsar jolt
#

...

#

you download it and put it on your PATH

mortal marten
#

okal y dokal y

#

i was asking since like. im stupid

austere stream
#

Works like a charm!

#

(I am so glad this exists.)

misty leaf
#

πŸ’›

#

are you using this on linux?

austere stream
cedar iris
#

haxeget doesn't install haxelib? πŸ₯²

#

ahh neko isn't installed nvm

drowsy dragon
#

Is there any plans for arm64 builds of haxe with haxeget?

misty leaf
#

If you implement it lol

#

I sometimes have access to a rpi5 so maybe one day I could try

#

Not too high in my priorities tho

drowsy dragon
cedar iris
#

Note: You will need to run setx /M HAXEPATH C:\.haxeget\haxe and add %HAXEPATH% to your PATH vars to use this version of Haxe!
Warning: HAXEPATH is not in your PATH. Add %HAXEPATH% to your PATH vars to use this version of Haxe!
Installation Complete!

#

How do i choose where it installs haxe to

misty leaf