kevva / elm-bin

elm-platform bin-wrapper that makes it seamlessly available as a local dependency
MIT License
18 stars 5 forks source link

Sync with official Elm version scheme #2

Closed passy closed 9 years ago

passy commented 9 years ago

Possibly a bit late for this, but it would be nice to at least somehow surface which version of the actual Elm-Platform this corresponds to, which is 0.14 at the moment.

kevva commented 9 years ago

Hm, that's hard with semver 2.0 though. btw, added you to npm too.

passy commented 9 years ago

Yup, definitely incompatible with semver in general, but since this is not a library or dependency but a distribution I wonder if that matters.

kevva commented 9 years ago

It could definitely be used as one though if someone were to use it programmatically.

passy commented 9 years ago

But how would you find out which version you installed at the moment?

kevva commented 9 years ago

Would probably need to hard code it somewhere.

passy commented 9 years ago

Pinging @evancz for input, too.

It's a tricky one because the two versioning strategies are incompatible. I think that the most common use case is going to be people wanting to run elm-make or elm-reactor and install it globally once. For those it would be helpful to give at least some indication of what version of the platform they're on. But I'm not quite sure what the best way would be.

passy commented 9 years ago

In other news, I pushed the OS X binaries for 0.14. So we could tag that as new release.

evancz commented 9 years ago

I have been using semver shifted by one digit. So it's like this 0.MAJOR.MINOR.PATCH. For languages, people infuse 1.0 with meaning that does not make any sense, so I must accommodate them.

I think the primary use case here is going to be people getting binaries, so matching the platform is probably more helpful than following the rules exactly such that no one will have any idea what's going on.

evancz commented 9 years ago

I think it's fair to say that if you are asking for a compiler, probably ask for a specific version.

kevva commented 9 years ago

Yeah, but using a 0.MINOR.PATCH with npm and semver 2.0 will result in locked versions. Say you're using ^0.1.8 or something in your package.json, if 0.1.9 is available it'll still use 0.1.8.

evancz commented 9 years ago

I think it'd be weird to want to get new versions of the compiler by surprise given how the releases work, but if you want that, is it possible to do 0.14.*?

passy commented 9 years ago

I don't think it would be a problem at all if the versions were locked by default. At least until 1.0 comes around. I think >= 0.14.0 <0.15 should work for what @evancz suggested.

sindresorhus commented 9 years ago

Say you're using ^0.1.8 or something in your package.json, if 0.1.9 is available it'll still use 0.1.8.

Nope, ^0.1.8 will install 0.1.9. Though ^0.1.8 will not install a possible 0.2.0 version.

sindresorhus commented 9 years ago

Syncing the version never makes sense as what happens when the bin package itself (not the elm bin) needs to do a breaking change and has to bump major.

What I would rather propose is to take advantage of the build specifier:

0.1.8+elm-1.0.0

Everything after the + is just metadata.

http://semver.org/

kevva commented 9 years ago

@sindresorhus, oh, yeah, they changed that (in npm), didn't they? Agree with using +.

passy commented 9 years ago

+1 for build specifier. Thanks, @sindresorhus! :)