Skip to content

Signature help fixes for exposed bugs and refactor after signature change #15278

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

Merged
merged 9 commits into from
Jun 10, 2022

Conversation

rochala
Copy link
Contributor

@rochala rochala commented May 24, 2022

Fixes #15248
Fixes #15244
Fixes #15284

For all found bugs i created tests.
This pull request changes almost whole file, as in previous implementation I tried to leave function signature the way it was.
It required few hacks to achieve that but now I've hit the wall and to fix:

object And {
  def unapply[A](a: A): Some[(A, A)] = Some((a, a))
}
object a {
  And.unapply(@@)
}

I had to change function signature as I discussed it with @tgodzik. As i changed signature, many places became unreadable and I had to refactor it a bit thus so many lines are changed. I could try split it into multiple pull requests but effect would be almost the same as it changed almost all file. I will pinpoint locations which caused each bug to where it was fixed.

I also wrote documentation for new functions to better explain the idea.

@rochala rochala requested a review from tgodzik May 24, 2022 08:41
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

Great work! I agree with the need to change the signature, but it would be great to minimize the impact on Metals (and possible other tools)

@rochala rochala requested a review from tgodzik May 24, 2022 14:39
@rochala rochala requested a review from tgodzik June 8, 2022 07:19
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

LGTM! The changes for Metals look to be working here:

tgodzik/metals@afef681

@rochala rochala merged commit 9614fb9 into scala:main Jun 10, 2022
dos65 pushed a commit to dos65/metals that referenced this pull request Jun 17, 2022
See: scala/scala3#15278
`Signatures.callInfo` was deprecated and we should use
`Signatures.signatureHelp`
dos65 pushed a commit to dos65/metals that referenced this pull request Jun 17, 2022
See: scala/scala3#15278
`Signatures.callInfo` was deprecated and we should use
`Signatures.signatureHelp`
dos65 pushed a commit to scalameta/metals that referenced this pull request Jun 17, 2022
See: scala/scala3#15278
`Signatures.callInfo` was deprecated and we should use
`Signatures.signatureHelp`
bishabosha pushed a commit to dotty-staging/dotty that referenced this pull request Oct 18, 2022
…ange (scala#15278)


* add deleted methods as depreceted one

* add type parameter inference for apply methods

* change signatureHelp method signature
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.

No inferred types for apply signatureHelp Issues with unapply signature help Wrong signature help in two edge cases
2 participants