juliaup icon indicating copy to clipboard operation
juliaup copied to clipboard

Centralize where paths are discovered

Open davidanthoff opened this issue 1 year ago • 5 comments

Alterantive to #886.

@ghyatzo I started to look into it, and then got carried away ;) I think this should be correct, but I'm also a bit nervous as any error in any of this would really be bad... If you could take a careful look if this all looks right to you that would be amazing.

The general idea now is that juliaupselfexecfolder is the folder where the juliaup binary is located and juliaupselfexec is the path to the juliaup binary itself. And all paths should be canonical.

There is one thing I don't fully understand, I'll leave a comment at that location.

davidanthoff avatar Apr 30 '24 20:04 davidanthoff

Nice to have this alternative! I took a look, it all seems good, and actually clears up a lot of the code, which is nice. I didn't want to touch the various features flags, or signatures, but happy that you did it, it feels better to have a single storage.

first a minor comment: probably still having the logic to get the exec path in a separate function can be beneficial for maintainability.

On another note, I am really uneasy about the get_bin_dir() function and the JULIAUP_BIN_DIR environmental variable. I commented about it exensively in my PR. That function get_bin_dir really feels out of place, and the JULIAUP_BIN_DIR is only used there as far as I can tell.

I would also really know what you think about the proposal of just instead using JULIAUP_DEPOT_PATH as the real "authority" and everything else can follow from that. (check the comment in #886)!

ghyatzo avatar Apr 30 '24 21:04 ghyatzo

Any news regarding this? or comments in #886?

ghyatzo avatar Jun 16 '24 09:06 ghyatzo

What's the status of this PR? :)

ghyatzo avatar Jan 21 '25 08:01 ghyatzo