Skip to content

Better refinement symbols in semanticDB - #18604

Merged
tgodzik merged 2 commits into
scala:mainfrom
jkciesluk:semanticdb-refl
Feb 18, 2026
Merged

Better refinement symbols in semanticDB#18604
tgodzik merged 2 commits into
scala:mainfrom
jkciesluk:semanticdb-refl

Conversation

@jkciesluk

Copy link
Copy Markdown
Contributor

Previosuly all Select on refined types have had symbol from reflect.Selectable and their definitions were not global. This change should improve navigation and rename in Metals and allow further changes in presentation compiler module, in order to provide better highlighting and hover

@Gedochao Gedochao added the stat: stale PR Marks any stale PRs, if no response is given, the PR qualifies as a one to close. label Feb 17, 2026
@Gedochao

Copy link
Copy Markdown
Contributor

@tanishiking @rochala @natsukagami is this still relevant? Do you mean to work on this in the near future, or should we close it?

@tgodzik

tgodzik commented Feb 17, 2026

Copy link
Copy Markdown
Contributor

@tanishiking @rochala @natsukagami is this still relevant? Do you mean to work on this in the near future, or should we close it?

It does still seem relevant, we would have to rebase an make sure it all still passes. I will take a look

@Gedochao Gedochao assigned tgodzik and unassigned tanishiking Feb 17, 2026
@tgodzik
tgodzik force-pushed the semanticdb-refl branch 3 times, most recently from 9652846 to a66dd3e Compare February 17, 2026 19:13
@Gedochao

Copy link
Copy Markdown
Contributor

Rebased again, since #25296 would likely fix the CI failure.

val s/*<-advanced::Test.s.*/ = new Structural/*->advanced::Structural#*/
val s1/*<-advanced::Test.s1.*/ = s/*->advanced::Test.s.*/.s1/*->advanced::Structural#s1().*/
val s1x/*<-advanced::Test.s1x.*/ = s/*->advanced::Test.s.*/.s1/*->advanced::Structural#s1().*/.x/*->scala::reflect::Selectable#selectDynamic().*/
val s1x/*<-advanced::Test.s1x.*/ = s/*->advanced::Test.s.*/.s1/*->advanced::Structural#s1().*/.x/*->local13*/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change might be unexpected, but the issue is that we don't have a way to represent a member of a type that is defined as result of the method. We should do a follow up for this. Maybe go the route of parameters?

Previosuly all `Select` on refined types have had symbol from `reflect.Selectable` and their definitions were not global.
This change should improve navigation and rename in Metals and allow further changes in presentation compiler module,
in order to provide better highlighting and hover
@tgodzik
tgodzik marked this pull request as ready for review February 18, 2026 10:21
@tgodzik

tgodzik commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Ok., this is ready to review. I think this is an overall improvement, though there might be some things to improve later on still.

@natsukagami natsukagami left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me.

Comment thread compiler/src/dotty/tools/dotc/semanticdb/Scala3.scala Outdated
@tgodzik
tgodzik enabled auto-merge (squash) February 18, 2026 12:01
@tgodzik
tgodzik merged commit f33c7d4 into scala:main Feb 18, 2026
60 checks passed
tgodzik added a commit to scala/scala3-lts that referenced this pull request Feb 26, 2026
Previosuly all `Select` on refined types have had symbol from
`reflect.Selectable` and their definitions were not global. This change
should improve navigation and rename in Metals and allow further changes
in presentation compiler module, in order to provide better highlighting
and hover

---------

Co-authored-by: Jakub Ciesluk <323892@uwr.edu.pl>
Co-authored-by: Tomasz Godzik <tgodzik@virtuslab.com>
[Cherry-picked f33c7d4][modified]
@WojciechMazur WojciechMazur added this to the 3.8.4 milestone Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: stale PR Marks any stale PRs, if no response is given, the PR qualifies as a one to close.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants