openfl / lime-vscode-extension

Visual Studio Code extension for OpenFL and Lime projects written in Haxe
https://marketplace.visualstudio.com/items?itemName=openfl.lime-vscode-extension
MIT License
27 stars 4 forks source link

Fall back to `haxelib run lime` when lime alias is missing #58

Closed joshtynjala closed 4 years ago

joshtynjala commented 4 years ago

If the user hasn't run haxelib run lime setup, the extension does not work because the extension currently requires the lime alias to exist. However, to help people get started more easily, I think that the extension should fall back to using haxelib run lime when Lime is installed, but the alias is missing.

I understand the how running lime instead of haxelib run lime looks nicer, from an aesthetic perspective. However, it's an extra step that doesn't seem strictly necessary. Ideally, if the alias is there, it should be used. Otherwise, the longer command can be a fallback.

The fewer steps for a developer to go from having nothing Haxe-related installed on their system to getting an OpenFL "hello world" running, the better. The more steps there are in that process, the more likely someone will just give up in the middle.

Some folks in the Feathers UI community have reported that they are doing exactly that: They're giving up for now and hoping that more experienced developers will write better tutorials. Removing this step from the process seems like it should help. Not only will fewer users quit in the middle, but it will make tutorials shorter.

Relatedly, I added Lime as a dependency of Feathers UI in haxelib.json because both HaxeDevelop and VSCode need it for code intelligence to work properly, and that makes for one less thing for users to install manually.

By the way, I removed the lime alias from my system, and HaxeDevelop still works fine, so they must be using haxelib run lime.

Gama11 commented 4 years ago

I added Lime as a dependency of Feathers UI in haxelib.json because both HaxeDevelop and VSCode need it for code intelligence to work properly

Hm, that doesn't seem right, not sure how that would impact code completion.

HaxeDevelop still works fine, so they must be using haxelib run lime

Yeah, HaxeDevelop uses the "safe" method.

joshtynjala commented 4 years ago

Maybe VSCode should also offer to install Lime for the user, if it's not installed already.

joshtynjala commented 4 years ago

Hm, that doesn't seem right, not sure how that would impact code completion.

You're right. This doesn't work properly. I've determined that it causes the GLObject error that someone reported on Discord.

XANOZOID commented 4 years ago

The Haxelib location could be found and then we could directly link into it the executable from there . . . It's not a far shot for a fallback.

joshtynjala commented 4 years ago

Good idea! I think that running haxelib libpath lime should give you that path.

joshtynjala commented 4 years ago

Closed by #73