Skip to content

Remove TraversePropertiesDsl from top-level toDataFrame {} operation - #2004

Draft
zaleslaw with Copilot wants to merge 2 commits into
masterfrom
copilot/remove-traversepropertiesdsl
Draft

Remove TraversePropertiesDsl from top-level toDataFrame {} operation#2004
zaleslaw with Copilot wants to merge 2 commits into
masterfrom
copilot/remove-traversepropertiesdsl

Conversation

Copilot AI commented Jul 28, 2026

Copy link
Copy Markdown

Top-level preserve() / exclude() calls inside toDataFrame {} had broken semantics: they were supposed to apply to all properties {} blocks but did not work reliably, and calling them without any properties {} block produced an empty DataFrame. The compiler plugin also never supported this notation.

Changes

  • CreateDataFrameDsl<T> no longer extends TraversePropertiesDslexclude() and preserve() are no longer directly available at the top level of toDataFrame {}
  • CreateDataFrameDslImpl — removed TraversePropertiesDsl by configuration delegation
  • Deprecated shimsexclude(), preserve(), and preserve<T>() are kept on CreateDataFrameDsl with DeprecationLevel.WARNING (→ ERROR in 1.1), forwarding to a properties {} block to ease migration
  • Binary API — updated via apiDump; methods remain in bytecode for binary compatibility

Migration

// Before (broken — top-level preserve silently ignored without properties())
toDataFrame {
    preserve(DataFrame::class)
}

// Before (confusing — top-level preserve applied to all properties blocks)
toDataFrame {
    preserve(DataFrame::class)
    properties()
}

// After (correct)
toDataFrame {
    properties(maxDepth = Int.MAX_VALUE) {
        preserve(DataFrame::class)
    }
}

- Remove TraversePropertiesDsl as supertype of CreateDataFrameDsl<T>
- Remove TraversePropertiesDsl delegation from CreateDataFrameDslImpl
- Add deprecated exclude/preserve methods to CreateDataFrameDsl with deprecation warning pointing to properties {} block
- Add deprecated preserve<T>() extension for CreateDataFrameDsl
- Update preserve T test to use properties {} block instead of top-level preserve()
- Update generated sources and binary API file
- Add TRAVERSE_PROPERTIES_DSL deprecation message constant
Copilot AI changed the title [WIP] Remove TraversePropertiesDsl from top-level toDataFrame {} operation Remove TraversePropertiesDsl from top-level toDataFrame {} operation Jul 28, 2026
Copilot AI requested a review from zaleslaw July 28, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove TraversePropertiesDsl from top-level toDataFrame {} operation

2 participants