HaxeFoundation / haxelib

The Haxe library manager
https://lib.haxe.org/
MIT License
172 stars 78 forks source link

Allow 'haxelib local' to take web url #105

Closed hughsando closed 8 years ago

hughsando commented 10 years ago

It would be nice to be able to point haxelib at a "wget" url as well as a local file.

Simn commented 10 years ago

haxelib local accepting web URLs is a bit of an oxymoron.

What is the use-case here?

hughsando commented 10 years ago

True enough about the oxymoron. The use case is that I want to provide nightly builds on the web - but not to go out generally if someone wants just tries an "update". Perhaps there is a better way. It is just to save some steps: wget http://blah.zip haxelib local blah.zip rm blah.zip

vs:

haxelib url http://blah.zip

Hugh

On Wed, Nov 27, 2013 at 7:42 PM, Simon Krajewski notifications@github.comwrote:

haxelib local accepting web URLs is a bit of an oxymoron.

What is the use-case here?

— Reply to this email directly or view it on GitHubhttps://github.com/HaxeFoundation/haxelib/issues/105#issuecomment-29378213 .

Simn commented 10 years ago

haxelib url would be fine with me.

hughsando commented 10 years ago

While you are at it - got a bug on haxelib that reports:

Library nme version dev does not have a neko dll for your system

This comes from haxe -cp "/usr/lib/haxe/lib/haxelib_client/3,1,0-rc,3/" -D haxelib_client --run tools.haxelib.Main $@

returning "linux" for Sys.systemName() on a mac. I presume this is from the haxe interpret code. Caused me some grief (because I removed the linux directory independently, which confused me). Nice to have source code though.

Would you like me to report a separate bug?

Hugh

On Wed, Nov 27, 2013 at 8:45 PM, Simon Krajewski notifications@github.comwrote:

haxelib url would be fine with me.

— Reply to this email directly or view it on GitHubhttps://github.com/HaxeFoundation/haxelib/issues/105#issuecomment-29381592 .

Simn commented 10 years ago

Yes, please file a separate bug.

jasononeil commented 10 years ago

Would it be too much overloading to use "haxelib install"?

Currently we have

haxelib install markdown # from haxelib haxelib install markdown.zip # local haxelib install build.hxml # all libs in hxml haxelib install all # all hxml files in CWD

And correspondingly rules that a library name cannot be "all", or end in ".zip" or ".html". So we could add:

haxelib install https://github.com/haxetink/tink_core/archive/master.zip

And library names starting with "http://" or "https://" are disallowed. (We may even have a regex preventing these names already?)

Cheers for the massive Haxelib cleanup! On 27 Nov 2013 20:45, "Simon Krajewski" notifications@github.com wrote:

haxelib url would be fine with me.

— Reply to this email directly or view it on GitHubhttps://github.com/HaxeFoundation/haxelib/issues/105#issuecomment-29381592 .

hughsando commented 10 years ago

Yes, I think a regex would be much better, and have a single "haxelib install file.zip|name[version]|http"

Hugh

Simn commented 10 years ago

I didn't know that haxelib install is so versatile already. In that case I agree we can extend it to check for http(s) prefix.

ncannasse commented 10 years ago

While we're at it we could also handle git:// svn:// and http://github.com/ncannasse/h3d as well

Simn commented 10 years ago

@jasononeil: To clarify, all these haxelib install checks you mention are available in the Haxelib version that comes with 3.0.0? I have to get this right in the new documentation.

back2dos commented 10 years ago

@Simn yep, those are all supported: https://github.com/HaxeFoundation/haxelib/blob/e711b2fe64325da22046df7dbad366f483190f4c/src/tools/haxelib/Main.hx#L402

Simn commented 10 years ago

I understand that they are supported, I need to know if they were supported in the Haxelib version that came with 3.0.0.

back2dos commented 10 years ago

Yes, that's what I meant to say. That's the implementation for Haxelib 3.0.0.

alebianco commented 9 years ago

@back2dos just for confirmation, the syntax haxelib install http://host/archive.zip would not work in the current implementation, correct? I think that would be enough to solve the issue

nadako commented 8 years ago

I think we can merge this issue into #238, since we're discussing npm-like url support there.