dsavvinov
01/18/2018, 8:28 PMcompiler/testData
for compiler and in idea/testData
for IDE). Testdata files are essentially kotlin code, with, possibly, some additional markup (e.g. indicating that some diagnostic should be reported here, etc.)
3. Generated runner-classes usually end with "Generated"-suffix, like DiagnosticTestGenerated
. They are very simple themselves and usually consist of a bunch of one-line methods, like doTest(...)
. Most of the test-case logic is implemented in their supertypes, like AbstractDiagnosticTest
4. If you want to add your own test, you can create your testdata, e.g. in compiler/testData
and run pre-defined run configuration from IDEA ("Generate Compiler Tests"). It will automatically discover new testdata and update runner (tip: it is easy to find which runner has been updated by looking at the git diff)
After that, you can create your own test and start stepping through the compiler code. If you will have any further questions, don't hesitate to ask! Cheers! đGrzegorz GoĆda
01/21/2018, 6:00 PMdsavvinov
01/21/2018, 6:34 PMGrzegorz GoĆda
01/21/2018, 6:50 PMGrzegorz GoĆda
01/21/2018, 6:51 PMGrzegorz GoĆda
01/21/2018, 6:51 PMGrzegorz GoĆda
01/21/2018, 6:52 PMGrzegorz GoĆda
01/21/2018, 6:52 PMdsavvinov
01/21/2018, 7:00 PMant -f update_dependencies.xml
and Refresh Gradle projects
in IDEA (and don't use gradle auto-import -- it should work fine, but let's try to eliminate that factor)Grzegorz GoĆda
01/21/2018, 7:05 PMGrzegorz GoĆda
01/21/2018, 7:05 PMGrzegorz GoĆda
01/21/2018, 7:05 PMdsavvinov
01/21/2018, 7:05 PMGrzegorz GoĆda
01/21/2018, 7:07 PMGrzegorz GoĆda
01/21/2018, 7:08 PMdsavvinov
01/21/2018, 7:09 PMGrzegorz GoĆda
01/21/2018, 7:11 PMdsavvinov
01/21/2018, 7:26 PMant -f update_dependecies.xml
3. Open kotlin
-folder in IDEA (just plain "open", not some "Import project" etc.)
Here you should see that "Tree view" on the left is messed up and doesn't show whole folder tree -- this is because we haven't set up project properly yet.
4. Then, you do "File | New | Module from existing sources" and open build.gradle.kts
just as readme suggests. Use default gradle wrapper, do not use auto-import.
After that, a lot of gradle-stuff should be launched, as well as indexing.
5. After all processes are finished, just to be safe, hit "Refresh gradle projects".
Then, project have to be imported properly: you should see whole tree view, modules, code highlighting, completion, etc.
You may receive popups about gradle or maven projects. IRC, maven is used only for libraries, so if you're not going to work with them, you can ignore related notifications.
You shouldn't receive any "Configure Kotlin in project"-suggestion, if they appear, then something went wrong.Grzegorz GoĆda
01/21/2018, 8:10 PMGrzegorz GoĆda
01/22/2018, 11:06 AMdsavvinov
01/22/2018, 11:13 AM-Xmx
, maybe something else? This can be useful for other kontributors; also we might consider to add it somewhere in github.Grzegorz GoĆda
01/22/2018, 11:22 AMGrzegorz GoĆda
01/22/2018, 11:24 AMGrzegorz GoĆda
01/22/2018, 11:25 AMGrzegorz GoĆda
01/22/2018, 11:25 AMGrzegorz GoĆda
01/22/2018, 11:25 AMGrzegorz GoĆda
01/22/2018, 11:25 AMGrzegorz GoĆda
01/22/2018, 11:25 AMGrzegorz GoĆda
01/22/2018, 11:27 AMGrzegorz GoĆda
01/22/2018, 11:27 AMGrzegorz GoĆda
01/22/2018, 11:27 AMGrzegorz GoĆda
01/22/2018, 11:28 AMGrzegorz GoĆda
01/22/2018, 11:28 AMGrzegorz GoĆda
01/22/2018, 11:29 AMGrzegorz GoĆda
01/22/2018, 11:32 AMdsavvinov
01/22/2018, 3:10 PMtestData
-folder), and no additional build configuration is required (given that you do not implement your own test runner, of course)Grzegorz GoĆda
01/22/2018, 3:19 PM