A command line tool which allows you to install and switch compiler versions as easy as possible. It is still in beta, but it should be usable now!
https://github.com/l0go/haxeget
#haxeget: the easier way to install and manage Haxe compiler versions
1 messages Β· Page 1 of 1 (latest)
Now with Windows support π
I was gonna make an announcement here lol, just was working on a short gif lol
[showcase] With the contributions of @barren bloom, haxeget now has Windows support and nightly builds.
What would be the best way to make an installer for windows? Just having a powershell script, or would using something like wix be better?
The easiest way is to make a script for PowerShell that adds the path to haxeget to the PATH system variable, but you need to be careful with testing the script so as not to erase all values from the variable, as I did today XD.
This works pretty well
Ah, do you have a powershell script already made?
No, I just manually add it to PATH
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
Oh, I've never worked with powershell scripts. I'll try something tomorrow
π
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
confusion is good!
that's how the enemies attack!
now rewrite it in haxe then compile to rust with custom reflaxe target
i wonder if that is even possible
how does it deal with IDEs locking files? (like haxe.exe)... does it / can it also pull neko / hl... seems super nice π₯³
I am planning to add neko support, Hashlink wouldn't be possible on non-windows platforms as their builds aren't statically linked afaik
Not really sure what you mean by the former?
All haxeget does is make a symlink to a directory added to your path
ah right, so its not deleting anything or anything like that
nope
Hmm, I wonder if ceramic support could be added
Since ceramic packages their own version of haxe
that would be kinda neat for linux peeps
Why not windows?
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
how tf does haxeget already have 1000 loc
π rust π
lmao probably
π
wow, that was fast
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
@barren bloom On windows, is there a guarantee that C:\\ will always exist?
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
As I know it's the first letter with which drives are named. It might always exists. But I'm not sure about ability to rename first drive
It also can be used to update nightly build
I think nightly should stay the same?
I want to make haxeget update without any arguments
maybe use the same folder structure and location that lix uses to store its haxe downloads? Would open up compiler sharing / interop between the two
I mean for the term itself "cache-directory," I don't know if it makes much sense
maybe "stash"
@delicate jacinth Hey, for ceramic all I would need to do is add tools to path, right?
Mmmmh to do what? π
for installation of pre-built ceramic without the haxelib
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
Does ./ceramic link link NodeJS and stuff too?
How do you make sure it doesn't conflict?
No, it only links ceramic command
on windows it cheats a little bit as it just adds ceramic command in HaxeToolkit dir, which is assumed to be in PATH already π¬
Ah, so as long as I symlink the ceramic in the path, it will be good?
It will not expose haxe to the machine, but yeah, ceramic command should work
and on windows, it is ceramic.cmd that needs to be linked?
@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
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
@barren bloom Thanks for the PR by the way
@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
@little rune Closed your error
Neat!
haxeget install haxeget- (with the dash there) should uninstall haxeget 
(for some reason you can do that in apt)
Feature request: Make it possible for me to manage ceramic haxe version π
How dare you
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)
yeah, if anything that should be an option that you can pass in to ceramic
I do understand the value of locking haxe versions, I'm not against it or anything. it's just most of what I'm doing is to improve my own endeavours and I like to be using latest things π
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.
absolutely, totally get that
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)
so am i man
I kinda dislike having to depend on someone elses binaries though
i can't wait for lsp to work for me
That makes sense, but there are not many other ways to lock dependencies reliably afaik
not without lix and that's a bit iffy
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)
I would make ceramic do something similar to haxeget and just download from the haxe website or github releases
ye
independent
That's what I did with the haxelib tool
basically I assume that if an user installs haxe, they have haxelib available, so let's use that
cause realistically it isn't hard to switch out ceramic versions, and haxe in general is pretty consistent
Oh? I thought it was a submodule?
nah, just a directory
wait so haxelib tool just downloads haxe binaries from haxe.org?
instead of from haxe-binaries or whatever you call it
i thought it just used this?
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
ah ok, that is what i originally thought
Again, the idea is to have Ceramic self-contained and be reliable and less dependent on all the moving parts of a computer environment
does any of this even matter for haxeget? isn't it just overwriting the directory with a new haxe binary?
haxeget would do the same as the haxelib tool
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/
worth adding a note to the help page that the individual may want to install haxelib from haxelib using the ceramic haxelib.exe
@misty leaf what if we could install/use this through haxelib? ποΈ
haxelib get-version 4.3.3 or something
haxelib depends on the haxe compiler though
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
Yeah, he said that he knew someone at his college who used Haxe. I assumed that I probably knew who it was, and was apparently correct.
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
i don't know rust either, it is okay
interesting that it doesn't work on M1 though? what was the error?
I don't remember honestly
did you compile from source or using the binaries?
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.
Nice
Rust is basically like javascript for better or worse
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
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++
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?
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
from what i understand, arocc uses zig's backend but doesn't compile to zig.
although i think it can compile to zig when used for translate-c?
oh, I'm still new to Zig have only used it for three days at the current moment
I think you may be right
but yeah, haxeget was pretty inspired by zvm
which ironically is written in go
so there is a zig influence
that the hell lmao
I have a question about haxeget, does it also manage with in development versions of Haxe 5? (For PickHaxe purposes)
haxeget install nightly
gotcha, thanks!
I can add it if you want for mac
please do, it probably deletes the .zip file too early
@lethal copper
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
Why is it called nightly?
Also I luv third party package managers, it feels better to use for version testing
Because every night it does a new build
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.
@mortal marten Did you ever get haxeget working?
no
i dont understand fully how to set it up
the paths thing keeps fucking with me
I don't use windows, but you should just need to add it to system variables?
yeah i know that much but
1 sec
do i literally just add %HAXEPATH% as a system variable since thats what i did and it did nothing
Hmm, @barren bloom shouldn't this error say what you should set HAXEPATH to?
It says it, when there's no HAXEPATH var. Looks like this var exists, but not in PATH var
You need to add %HAXEPATH% into PATH variable.
And make sure that system variable name is HAXEPATH, without %
ok 1 second
wa it so the haxepath goes here or
Yes, and also you need to edit Path and add %HAXEPATH% in it
what
Oh, no, you shouldn't edit HAXEPATH var
Is there a way to automate this?
i know its possible, but idk how you actually do it
idk anything about windows lol
i know the python installer has an option to add itself to PATH
interesting
There is, but I accidentally removed all Path var, while tested it π.
π
baha
wait so do i just add %HAXEPATH% here??? and leave the other haxepath unchanged?
Yes
did you restart?
i did this yesterday
after editing your envvars?
i did it yesterday and then i (ofc) turned off my pc for the night and then came back today and its the same so
yeah
i have a feeling that its something really stupid that im not doing / doing which is making this not work
You need to place into HAXEPATH path to 'haxe' folder into '.haxeget' folder
or that its stupidly simple to most people and i just cant get it π
well restart anyways
And restart command prompt
what
from this to the .haxeget folder?
To .haxeget/haxe as I remember
.haxeget/haxe doesnt work
i assume it would be C:\.haxeget\haxe?
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
is this even
what is inside the .haxeget dir?
It should be C:\.haxeget\haxe
that
doesnt work
since
the haxe folder is just a shortcut
It works for me, lol
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
It should target unziped folder...
that doesnt exist
or well it does
but
Looks like somebody broke that
their names are scrambled
i think the last windows changes were by ninjamuffin
i don't think i did anything related there
// 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()
))?;
}
I think it goes from this commit
https://github.com/l0go/haxeget/commit/21876e60aa59c88f179ea8d4e7f4d2169bf0255f
ah "Probably broke something"
Well, looks like new pr from me with fix and automatization π
lol, sorry!
Or not... Rust is too "safe" to allow to set system variables
Rust don't have any ways to do something with system variables except read them
I found one, but it seems to do nothing

Wtf, latest git version works properly on my pc
I don't know how it works, maybe that is good idea
Can it be outdated or something like that?
cargo?
cargo version is up to date
@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
Looks like cargo install method is too broken
later on i will remove it from the readme
so does it just
not work on windows
pushed that lol
ok how do you like,,, do it from the releases
yup
Is there any plans for arm64 builds of haxe with haxeget?
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
bet
Note: You will need to run
setx /M HAXEPATH C:\.haxeget\haxeand 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
I donβt actually know. It has been awhile since I looked in the source. Iβll check later.
it's no priority
