Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Working with Crystal Version Manager? #3

Closed
nsweeting opened this issue Sep 9, 2016 · 9 comments
Closed

Working with Crystal Version Manager? #3

nsweeting opened this issue Sep 9, 2016 · 9 comments

Comments

@nsweeting
Copy link

Hi there,

I'm using crystal 0.19.0 with crenv. So I provided atom-crystal with /home/username/.crenv/versions/0.19.0/bin for the compiler executable directory. This doesn't seem to be working though. I am getting the following error:

'crystal' could not be spawned. Is it installed and on your path? If so please open an issue on the package spawning the process.

Any help on this would be appreciated.

@keplersj
Copy link
Contributor

I'll look into integrating crenv directly

@keplersj keplersj self-assigned this Sep 15, 2016
@keplersj keplersj removed their assignment Aug 10, 2017
@keplersj
Copy link
Contributor

@faustinoaq Thought's on crenv and scry?

@faustinoaq
Copy link
Member

I used to work with cenv but it uses LLVM 3.5, Would be good a crenv without too old versions of LLVM and crystal.

I mean crenv can install crystal 0.7.0 I think is not too useful in the way this language evolves. Also LLVM 3.5 is generating wrong code see: crystal-lang/crystal#4104

So I provided atom-crystal with /home/username/.crenv/versions/0.19.0/bin for the compiler executable directory.

I think you should use /embedded/bin instead of just /bin

Thought's on crenv and scry?

I think we can let to user specify the path for executable. If executable is in global path, then the extension should detect it and use it by default. By example:

# by default tries to detect if a executable is available.
crystal.compiler = 'crystal'
crystal.server = 'scry'
# If user doesn't have a executable in global path then need to specify path.
# I think this is good because user can specify versions per workspace
crystal.compiler = '/home/username/.crenv/versions/0.19.0/bin'
crystal.server = '/home/main/Projects/scry/scry'

Some of this configuration was an idea by @kofno inside Scry https://github.com/kofno/scry/blob/master/src/scry/protocol/settings.cr#L18
(see command and backend)

@faustinoaq
Copy link
Member

crenv binaries works as a normal executable, the problem is that CRYSTAL_PATH is empty.

$ ~/.anyenv/envs/crenv/versions/0.18.7/embedded/bin/crystal -v
Crystal 0.18.7 [68783f1] (2016-07-03)
$ ~/.anyenv/envs/crenv/versions/0.18.7/embedded/bin/crystal env
CRYSTAL_CACHE_DIR="/home/main/.cache/crystal"
CRYSTAL_PATH=""
CRYSTAL_VERSION="0.18.7

I think would be easier if user do crenv global <version> instead.

@faustinoaq
Copy link
Member

faustinoaq commented Aug 10, 2017 via email

@keplersj
Copy link
Contributor

@faustinoaq I like this idea. Let's discuss it in the scry gitter.

@keplersj
Copy link
Contributor

keplersj commented Mar 7, 2018

@faustinoaq Where does this fall in relation to scry?

@faustinoaq
Copy link
Member

I don't think this issue is related to scry, but thanks to it we released Crystal Lang Tools organization 🎉

I think if you want to use a specific crystal version then you should set you desired version as global, I remember crenv has an option for that.

@keplersj
Copy link
Contributor

keplersj commented Mar 7, 2018

Closing. Sounds like scry should support this out of the box, and this package is just a wrapper around scry now. Please, reopen if this isn't true.

@keplersj keplersj closed this as completed Mar 7, 2018
@faustinoaq faustinoaq added this to Done in Crystal Tools Apr 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Crystal Tools
  
Done
Development

No branches or pull requests

3 participants