I've just added a few more details to the ReadMe.md with links to the plugin download, plugin repo XML and a few tips on how to start contributing, forking and dealing with git etc.
Am sure we can improve it further :). Patches welcome
I've just added a few more details to the ReadMe.md with links to the plugin download, plugin repo XML and a few tips on how to start contributing, forking and dealing with git etc.
Am sure we can improve it further :). Patches welcome
There's still some missing information, in my opinion: once I follow all these instructions, I load a .kt file in the editor and I get told I need to configure the Kotlin runtime. Clicking on that link prompts me for a directory with zero instructions.
I answered right once, and everything worked, but this time around, I must have pointed IDEA to the wrong directory because even though it accepted my path, all my .kt files are lit up in red. And now I have no idea 1) how I can modify the Kotlin runtime (the only occurrence of “Kotlin” in the preferences is for code formatting) and 2) what path I’m supposed to enter there.
Here is an additional suggestion that would make bootstrapping easier: if IDEA detects that the current project contains a valid Kotlin runtime, automatically use it. Ideally, there shouldn’t be any other steps after you have cloned the repo and opened the module at the root.
Agreed! I've hit the 'randonly stuff goes red' issue before - to fix it I found I had to add a KotlinRuntime library to the project which contained the jars in dist/kotlinc/lib/*. I hope the plugin can just default to using its own copy of the compiler & runtime if a project isn't configured correctly to define one
So... how do I do that? (my initial reaction was to right click on the project and look for a Properties or something, but no luck)
Also, based on your answer, the lib/ directory of the git repo is not the right answer. The righ answer is kotlinc/lib, which I suspect I need to download separately? Or is it somewhere in the git repo?
Again, it would really be nice if the steps to start working on the code base could be
The 'red problem' I had was on a separate project; so I just added a new Library to the project dependencies and selected all the jars from a Kotlin compiler distro. Kinda hacky though :)
Maybe its an idea if I checking my IDEA project files for the “libraries” project, which seems to open fine for me?
I still don't know how to modify the bogus "Kotlin runtime" I gave to my project...
Maybe its an idea if I checking my IDEA project files for the "libraries" project, which seems to open fine for me?
Sorry, I can’t parse that
Just open the Project Structure dialog and remove the library, then reconfigure it again with the same dialog.I still don't know how to modify the bogus "Kotlin runtime" I gave to my project...
Hi Andrey,
I just did that but I’m still seeing errors all over my .kt files. Here is what the structure looks like:
I tried setting it to “kotlinc” and “kotlinc/lib”, none fixed the problem.
What is the magic value to enter in this dialog?
By the way, I don't know if it's related, but I'm seeing the following error too:
11:00:33 AM IllegalStateException: @NotNull method org/jetbrains/jet/lang/descriptors/MutableClassDescriptorLite.getTypeConstructor must not return null: @NotNull method org/jetbrains/jet/lang/descriptors/MutableClassDescriptorLite.getTypeConstructor must not return null
You should remove Kotlin plugin when you working with the Kotlin's project.
Oh, silly me. I overlooked that you were opening the Kotlin project itself having the plugin installed. You can't really work on plugin's sources having the plugin installed for now. Also, you don't need the plugin to modify its sources, as they are currently written in Java.
cedricbeust wrote:
I still don’t know how to modify the bogus “Kotlin runtime” I gave to my project…
Maybe its an idea if I checking my IDEA project files for the "libraries" project, which seems to open fine for me?
Sorry, I can’t parse that
Sorry :), let me try again:
So I was just suggesting I add back the IDEA project files for the libraries project; though am not sure if thats your issue.