Skip to content

Drop invalid assumption from TastyUnpickler #23353

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Jentsch
Copy link
Contributor

@Jentsch Jentsch commented Jun 11, 2025

Fixes #22265

I'm actually not sure if the scaladox-testcases sub-project is the right place for the test. In sbt scaladoc/test fails the dotty.tools.scaladoc.tasty.comments.MemberLookupTests.

@Gedochao Gedochao requested a review from jchyb June 12, 2025 07:40
@jchyb
Copy link
Contributor

jchyb commented Jun 17, 2025

Hi @Jentsch. Thank you for submitting the fix. I will admit I'm a little uncomfortable with just removing the assertion in Tasty Unpickler. It does seem like the compiler pickles incorrect stuff to begin with. Running scalac -print-tasty breaks.tasty reveals that there is a recorded source change on the inlined IMPORT node (which does not really make sense, as it should be on the outer BLOCK node):

    92:               BLOCK(11) // source change, in my opinion, should be recorded here
    94:                 UNITconst
    95:                 IMPORT(8) // source change was recorded here
    97:                   TERMREF 24 [List]
    99:                     TERMREF 25 [package]
   101:                       SHAREDtype 56
   103:                   IMPORTED 26 [empty]

I'll try to take a closer look into this in the coming days

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.

Scala doc crashes with AssertionError on macro generated code
2 participants