ceylon-lang.org icon indicating copy to clipboard operation
ceylon-lang.org copied to clipboard

Document CEYLON_HOME and CEYLON_VERSION

Open quintesse opened this issue 10 years ago • 6 comments

quintesse avatar Apr 20 '15 15:04 quintesse

@quintesse please could you document this, or tell me what CEYLON_VERSION is for and I will do it for you.

tombentley avatar Nov 11 '16 12:11 tombentley

I'm not sure CEYLON_VERSION should be documented ;)

At least not publicly, because it's not a really supported option.

The idea was from the beginning that it could be used to select the Ceylon version to run. It overrides the detection of the Ceylon version being run and adjusts the lookup path for the distribution modules accordingly.

It actually works iff you have several Ceylon versions installed in the same system repository... which we actually never do, so it was never really used. But it does work, so I never removed it either hoping that maybe someday there could be a use for it.

It's also somewhat superseded by the --distribution argument that used by the Bootstrap system. But they are not the same, the bootstrap is much more useful perhaps but it's also a sledge-hammer, it will download and install the requested version and start it and that's it. No way to have it point to something you might already have lying around. The CEYLON_VERSION is more of a soft touch, simply suggesting to use a different version but looking in all the normal places.

So reading this "explanation" you think we should put any of that somewhere in the docs?

quintesse avatar Nov 11 '16 12:11 quintesse

I was about to document CEYLON_HOME and then I realised that, actually, I didn't understand what that is for either. It's obviously for telling something where the distribution is, but what?

tombentley avatar Nov 11 '16 13:11 tombentley

Well that one is definitely easier: it works the same as JAVA_HOME: it tells the ceylon command where to find the Ceylon installation/distribution. Meaning very specifically "the place where it can find lib/ceylon-bootstrap.jar". When not specified it will be set to the parent folder of the folder where ceylon itself (the script) was found.

quintesse avatar Nov 11 '16 15:11 quintesse

When not specified it will be set to the parent folder of the folder where ceylon itself (the script) was found.

…following symlinks in the process, which is why symlinking ~/bin/ceylon to ../git/ceylon/ceylon/dist/dist/bin/ceylon works.

lucaswerkmeister avatar Nov 11 '16 15:11 lucaswerkmeister

True, but not sure if it's necessary to go into that much detail. The fact is it works, how we do it is just an implementation detail IMO.

quintesse avatar Nov 11 '16 15:11 quintesse