haxelib icon indicating copy to clipboard operation
haxelib copied to clipboard

haxelib proxy settings are stored in repository

Open nadako opened this issue 9 years ago • 5 comments

I find it very weird that haxelib proxy settings are stored in a .proxy file in the repository, rather than in some global configuration. It doesn't play well with the project-local repositories at all.

I think we should change that. But for that we might as well design a proper configuration location. E.g. maybe it's better if ~/.haxelib was a directory that contain repo and proxy files. In future we could also store library download cache there.

Somewhat related to #259

nadako avatar Mar 12 '16 21:03 nadako

Related to #161

ibilon avatar Mar 12 '16 22:03 ibilon

Not sure how easy it'd be to migrate from a file to a directory.

For the config I think we should have a single json file (~/.haxelibconfig?), and a single command (similar to git config) to modify them:

haxelib config set proxy host:ip
haxelib config set git_exe /path/to/git
haxelib config get repository_path
haxelib config get cache_path

ibilon avatar Mar 13 '16 13:03 ibilon

I also thought about a json (or whatever) config file, however this strikes me as less optimal solution, performance wise. Right now for e.g. haxelib path call we simply read the path from ~/.haxelib and use it. With a config file we'd have to parse JSON, allocate objects for config, then lookup repository path field from it. This is why I proposed a directory with simple files instead. I haven't done any benchmarks though.

nadako avatar Mar 13 '16 15:03 nadako

Could go for a simpler "one key-value pair per line" format,

but I guess that depends on how much config values you need to get, if the parsing is more or less efficient than multiple filesystem access.

ibilon avatar Mar 13 '16 19:03 ibilon

What is the .proxy file format? haxelib proxy command dont work...

ghost avatar Dec 10 '18 17:12 ghost