-
Notifications
You must be signed in to change notification settings - Fork 1.1k
TreeCopier
doesn't preserve attachments
#4291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It looks like they're not copied over on purpose: it appears that copying them breaks a lot of things. Should the docs be stored somewhere else that will not be lost down the line? Should we only copy the doc comment in |
What kind of failures are you getting?
Maybe we need two kinds of attachments: sticky and non-sticky. |
@smarter Here's sbt's log for
Sounds good! I'll look into that. |
Sticky attachments are attachments whose key is a subclass of `StickyKey`. Those attachments should be copied when a tree is copied using a `TreeCopier`. Fixes scala#4291
Fix #4291: Copy sticky attachments in `TreeCopier`
This reverts commit 4062073.
While working on embedding the doc in Tasty, I noticed that the
TreeCopier
subclasses don't copy over the attachments of the trees.Is this on purpose?
Doc comments are stored as attachments on
MemberDef
trees, and cannot be recovered in the REPL for instance, because they're discarded when the trees are modified.The text was updated successfully, but these errors were encountered: