Skip to content

Wrong position in SourceFiles from TASTY #11547

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
BarkingBad opened this issue Feb 26, 2021 · 10 comments
Open

Wrong position in SourceFiles from TASTY #11547

BarkingBad opened this issue Feb 26, 2021 · 10 comments
Labels
area:tasty-format issues relating to TASTy as a portable standard itype:bug stat:needs info stat:needs minimization Needs a self contained minimization

Comments

@BarkingBad
Copy link
Contributor

Compiler version

Scala compiler version 3.0.0-RC2-bin-SNAPSHOT-git-5abd9d9 -- Copyright 2002-2021, LAMP/EPFL

Minimized code

    if sym.normalizedName contains "OnCompleteRunnable" then
      println(s"${sym.pos.get.start} start")
      println(s"${sym.pos.get.startColumn} startColumn")
      println(s"${sym.pos.get.startLine} startLine")

      println(s"${sym.pos.get.end} end")
      println(s"${sym.pos.get.endColumn} endColumn")
      println(s"${sym.pos.get.endLine} endLine")

      println(s"${sym.pos.get.sourceFile} sourceFile")
      println(s"${sym.pos.get.sourceCode} sourceCode")

Output

38175 start
26478 startColumn
282 startLine
38175 end
26478 endColumn
282 endLine
out/bootstrap/stdlib-bootstrapped/scala-3.0.0-RC2/src_managed/main/scala-library-src/scala/concurrent/Future.scala sourceFile
Some() sourceCode

Expectation

The trait related to symbol is located here. The only thing that is correct is sourceFile. The sourceCode is empty. I know there is more symbols that have problem e. g. object Future

@BarkingBad BarkingBad added itype:bug area:tasty-format issues relating to TASTy as a portable standard labels Feb 26, 2021
@BarkingBad
Copy link
Contributor Author

Apparently this problem exists only for me, although I have fetched the newest master, cleaned sbt and cleaned git.

@BarkingBad
Copy link
Contributor Author

Apparently it's not only for me, though it's kind of nondeterministic. I have found Predef from https://dotty.epfl.ch/api/scala/Predef$.html is having wrong source, though line of code we take directly from Tasty Position. All the issues so far were for scala 2.13.5 sources

@pikinier20
Copy link
Contributor

@nicolasstucki nicolasstucki removed their assignment Apr 15, 2021
@nicolasstucki nicolasstucki added stat:needs info stat:needs minimization Needs a self contained minimization labels Apr 27, 2021
@anatoliykmetyuk anatoliykmetyuk added the Spree Suitable for a future Spree label Oct 15, 2021
@scala-center-bot
Copy link

This issue was picked for the Issue Spree No. 26 of 14 February 2023 which takes place in a week from now. @SethTisue, @jan-pieter, @nmcb will be working on it. If you have any insight into the issue or guidance on how to fix it, please leave it here.

@SethTisue
Copy link
Member

gah, I am sorry, but something came up and I cannot attend the spree today :-/

@SethTisue SethTisue self-assigned this Feb 14, 2023
@SethTisue
Copy link
Member

(I'm still interested in the ticket and perhaps I could help make progress afterwards if the ticket isn't fixable during the spree itself.)

@SethTisue
Copy link
Member

Did some work on this happen at the spree, or did you guys end up on something else?

@jan-pieter
Copy link
Contributor

We felt we were missing some context/knowledge and were hoping you could provide that 😉 We ended up switching to a different issue. Perhaps we can pick this up next spree if someone can provide a bit more context (either during the spree or in this issue). Specifically where to paste this code; is this part of a macro or during scaladoc generation? And do we indeed have tasty files for 2.13 sources?

@SethTisue
Copy link
Member

I asked for this ticket again for the Mar 7 spree. I picked this as a learning opportunity for myself rather than because I'm already an expert, so I don't know the answers to your questions. I hope to have a closer look enough ahead of the spree that we'll have time to switch to something else if this appears to be unsuitable.

@SethTisue SethTisue removed their assignment Mar 27, 2023
@SethTisue
Copy link
Member

I'm on something else for the spree tomorrow, so I've un-assigned myself. (I'd wouldn't mind being re-selected for it in the future.)

@mbovel mbovel removed the Spree Suitable for a future Spree label May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:tasty-format issues relating to TASTy as a portable standard itype:bug stat:needs info stat:needs minimization Needs a self contained minimization
Projects
None yet
Development

No branches or pull requests

8 participants