forked from scalacenter/scala-debug-adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Simplify usage of tasty-query and make things more precise. #6
Merged
adpi2
merged 14 commits into
adpi2:better-stack-trace
from
sjrd:simplify-tasty-query-usage
Nov 6, 2023
Merged
Simplify usage of tasty-query and make things more precise. #6
adpi2
merged 14 commits into
adpi2:better-stack-trace
from
sjrd:simplify-tasty-query-usage
Nov 6, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
And by explicitly following owners one at a time, instead of converting the whole signature name into a string and then doing regex-based decomposition. The signature name is a particular (lossy) encoding of the class/array decomposition of `ErasedTypeRef`, and of the owner/name chain of `ClassSymbol`s. We now directly look at that original information instead of recovering part of that information from the signature name encoding.
…ctor. That is their only source. In general, it makes no sense to erase a wildcard. It only makes sense in that particular place because the compiler later turns those type arguments into actual arguments and result types, where it picks their upper bound.
Previously, `matchSignature1` had 3 completely separate code paths for `java.lang.Enum` constructors, curried context functions, and other methods. We now limit the separate code paths to identifying the types of "expanded" parameters. Then, the actual matching is done in a unique way.
There are three categories of matching that each performed the same surrounding computations at all call sites. We now factor them out.
Instead of our extension `declaredTypeAsSeenFrom`.
Previously, the code attempted to compare a string to `"void"`, but even if it were `Unit`, the returned string would be `"scala.Unit"`, defeating the purpose of the test. We now semantically compare the `ErasedTypeRef`. This does not appear to change anything in our tests, however.
adpi2
approved these changes
Nov 6, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a series of refactorings I found by looking at how tasty-query was used, and how to make its usage more precise/semantic.
Take what you want ;)