Updated ReadMe on downloading/installing plugin and git


#1

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 :slight_smile:


#2

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.


#3

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


#4

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

  1. git clone
  2. open the module
  3. done

#5

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?


#6

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 :slight_smile:


#7

I still don't know how to modify the bogus "Kotlin runtime" I gave to my project...

Just open the Project Structure dialog and remove the library, then reconfigure it again with the same dialog.

#8

Hi Andrey,

I just did that but I’m still seeing errors all over my .kt files. Here is what the structure looks like:

/uploads/kotlinlang/original/2X/a/a2a7b3ff732e3b470a7154ba84318374f891b392.png

I tried setting it to “kotlinc” and “kotlinc/lib”, none fixed the problem.

What is the magic value to enter in this dialog?


#9

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


#10

You should remove Kotlin plugin when you working with the Kotlin's project.


#11

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.


#12

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 :slight_smile:

Sorry :), let me try again:

  • The root project - which is pure Java and creates the compiler and IDEA plugin, has its IDEA project files in git. To open & work on this project you must not have the Kotlin plugin installed
  • The libraries project is based on maven and contains pretty much all kotlin source to build the standard library, tools and tests etc. Its recommended you use the Kotlin plugin for this project. Since IDEA can open a maven project fine, I recently zapped the IDEA project files for the libraries project.

So I was just suggesting I add back the IDEA project files for the libraries project; though am not sure if thats your issue.