-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
Fix Scala inference not inferring a symbol name after a function call #15565
Conversation
Awesome! Thank you so much. I've pinged more qualified reviewers and kicked off CI |
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 for the fix. Will wait for @tdyas to take a look.
To fix the lint errors, you can run ./pants fmt src/python/pants/backend/scala/dependency_inference/scala_parser_test.py
# Select with Apply as Qualifier only yield the name after the Apply | ||
".toInt", |
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.
This seems like a bug... is it avoidable by recursing on a different portion of node.qual
?
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.
it is actually not related to the qual, it existed even before my pr, that the behavior of extractName
when the qual is not one of the cases in the match, but let me try and fix that in another commit.
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.
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.
Looks good to me. Thanks!
We are currently running pants from source using our branch because we need #15583. So we made a temporary patch to the ScalaParser: Bottom line, cherry-picking for 2.11 is not required for us. |
…d#15565) This fix solved most of our compilation errors without adding explicit dependencies. The problem is if the `qual` part of the Select term is Apply term the ScalaParser doesn't build the full name, only the outer term name and the dependency cannot be inferred automatically. This PR continues and visits the `qual` node of the select term. [ci skip-rust] [ci skip-build-wheels]
… (Cherry-pick of #15565) (#15603) The problem is if the `qual` part of the Select term is Apply term the ScalaParser doesn't build the full name, only the outer term name and the dependency cannot be inferred automatically. This PR continues and visits the `qual` node of the select term. [ci skip-rust] [ci skip-build-wheels] Co-authored-by: Doron Somech <[email protected]>
This fix solved most of our compilation errors without adding explicit dependencies.
The problem is if the
qual
part of the Select term is Apply term the ScalaParser doesn't build the full name, only the outer term name and the dependency cannot be inferred automatically. This PR continues and visits thequal
node of the select term.