Skip to content

Conversation

@olafurpg
Copy link
Contributor

Previously, doing "Find references" on a synthetic case class symbol (for example, named parameter of a copy method) then it only showed usages of that symbol and the non-synthetic symbol (for example, the
case class field that matches the copy parameter). It didn't
return usages of other synthetic symbols that also relate to the case class field (for example, the apply parameter).

This PR fixes the issue by adding is_reference relationships between all synthetic symbols that relate to the same non-synthetic symbol.

Test plan

See updated snapshots.

Previously, doing "Find references" on a synthetic case class symbol
(for example, named parameter of a `copy` method) then it only showed
usages of that symbol and the non-synthetic symbol (for example, the
    case class field that matches the `copy` parameter). It didn't
return usages of other synthetic symbols that also relate to the case
class field (for example, the `apply` parameter).

This PR fixes the issue by adding `is_reference` relationships between
all synthetic symbols that relate to the same non-synthetic symbol.
Previously, it only ran `src code-intel upload` on git tags and master
branch.
Needed to use `Nullable` annotation
Comment on lines -20 to 23
with:
distribution: 'temurin'
distribution: "temurin"
java-version: 8
cache: 'sbt'
cache: "sbt"

Copy link
Contributor

Choose a reason for hiding this comment

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

Rest of the changes aside, let's bikeshed about this for a few days.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have format on save enabled in VS Code and 🤷🏻 Worth adding a CI check to format the YAML files with prettier

// ________ synthetic_definition semanticdb maven . . minimized/Issue396#productElement().
// documentation ```scala\ndef productElement(x$1: Int): Any\n```
// relationship is_definition semanticdb maven . . minimized/Issue396#
// relationship is_reference semanticdb maven . . minimized/Issue396.apply().
Copy link
Contributor

Choose a reason for hiding this comment

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

Lifting from slack: both @olafurpg and I agree that productElement* family of methods shouldn't be referencing apply

copy is fine
default constructor is fine-ish (even though it's the other way around?)

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.

3 participants