Classes in stdlib/src/generated


#1

I'm trying to make some improvements in JLangItarables.kt and it requires to apply this changes to the files in generated dir.

How classes in stdlib/src/generated has been generated? Is there any script that allows to do it?

Thanks,
Sergey


#2

Damn I thought I'd documented it somewhere, but it seems like I've not :(

This is the script to do the generation:
https://github.com/JetBrains/kotlin/blob/master/libraries/stdlib/test/GenerateStandardLib.kt

I was hoping to use a proper compiler plugin one day; right now its kind of a hack.

To run it from kotlin/libraries/stdlib run:

mvn test-compile exec:java

Its pretty hairy doing this; as we've no AST/macro features or anything so all we can do is just text search & replace which is pretty error prone.


#3

Thank you for the reply.