Example projects migration with compiler plugin#1734
Conversation
8c45513 to
69e4344
Compare
…ler plugin enabled
69e4344 to
106884e
Compare
…mpiler plugin enabled
| // TODO replace with requireColumn {} when available | ||
| // parse cannot know what type the columns will be at runtime, | ||
| // so we need to cast the columns ourselves. | ||
| .cast<ParsedStats>(verify = true) |
There was a problem hiding this comment.
maybe instead of ParsedStats use convert + with? temporarily
There was a problem hiding this comment.
could work too. I don't think .convert { nameEndsWith("Count") } already works, right?
There was a problem hiding this comment.
change @Interpretable("NameEndsWith1") -> @Interpretable("NameEndsWith"), it'll work
There was a problem hiding this comment.
alright! however then there will be a difference between the dev and the release version. Which is fine :) that's why we have two versions
| .split { genres }.by("|").inplace() | ||
| // TODO replace with `requireColumn {}` #1715 or replace+AddDsl #1749 | ||
| .split { title }.by { | ||
| listOf<Any>( |
There was a problem hiding this comment.
Thought of an another approach. Split List and perform convert later
listOf(
"""\s*(\d{4})\s*$""".toRegex().replace(title, ""),
"\d{4}".toRegex().findAll(title).lastOrNull()?.value ?: "",
)
and later
convert { year }.with { it.toIntOrNull() ?: -1 }
There was a problem hiding this comment.
only downside is that it creates String? types
There was a problem hiding this comment.
even if the list is not nullable... is that supposed to happen?
There was a problem hiding this comment.
ahh, right
yes, if you split lists with different sizes then null values can appear, so we have to play safe
There was a problem hiding this comment.
another reason why we need specialized replace function :)
|
Thanks! Fixed all feedback, fixed nameContains, and dependency substitution :) |



moving youtube and movies example projects to /examples/projects(/dev) with compiler plugin enabled
Helps #1614