Skip to content

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

Open
zaleslaw with Copilot wants to merge 5 commits into
masterfrom
copilot/remove-traversepropertiesdsl
Open

Remove TraversePropertiesDsl from top-level toDataFrame {} operation#2004
zaleslaw with Copilot wants to merge 5 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
    ERROR, because their behavior is no longer possible, as the supertype of CreateDataFrameDsl was removed.
  • 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)
    }
}

Copilot AI linked an issue Jul 28, 2026 that may be closed by this pull request
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
@Jolanrensen Jolanrensen self-assigned this Jul 29, 2026
@Jolanrensen

Copy link
Copy Markdown
Collaborator

Seems like a good base, I'll continue from this

This comment was marked as resolved.

- 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
@Jolanrensen
Jolanrensen force-pushed the copilot/remove-traversepropertiesdsl branch from 13f7721 to 72f2d66 Compare July 29, 2026 13:42
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Jolanrensen
Jolanrensen force-pushed the copilot/remove-traversepropertiesdsl branch from 72f2d66 to 367226c Compare July 31, 2026 10:10
@Jolanrensen
Jolanrensen marked this pull request as ready for review July 31, 2026 10:11
@Jolanrensen

Copy link
Copy Markdown
Collaborator

@koperagen I added a DslMarker to prevent functions from toDataFrame {} being called from inside properties {}.
This simplifies the DSL somewhat.
I believe this doesn't have any negative effects, unless you can think of an example that seems legit but that I broke with this marker?

@Jolanrensen
Jolanrensen requested review from koperagen and removed request for koperagen and zaleslaw July 31, 2026 10:15
…taFrame {} directly to ERROR because their behavior is no longer possible
@Jolanrensen
Jolanrensen requested a review from koperagen July 31, 2026 10:21
@koperagen

Copy link
Copy Markdown
Collaborator

@Jolanrensen good idea to add declarations for clear deprecation :)

@koperagen I added a DslMarker to prevent functions from toDataFrame {} being called from inside properties {}. This simplifies the DSL somewhat. I believe this doesn't have any negative effects, unless you can think of an example that seems legit but that I broke with this marker?

I don't see valid use cases that this marker could break.

@Jolanrensen

Copy link
Copy Markdown
Collaborator

good idea to add declarations for clear deprecation :)

Haha, props to copilot for that idea ;P

@koperagen

Copy link
Copy Markdown
Collaborator

good idea to add declarations for clear deprecation :)

Haha, props to copilot for that idea ;P

image

ahahahahaha
hold on
guess it's not funny then

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

5 participants