metals icon indicating copy to clipboard operation
metals copied to clipboard

fix: type completions additonal fixes

Open dos65 opened this issue 2 years ago ā€¢ 4 comments

  • fixes completion for term symbol that aren't method
  • allow object at type completion pos

should include a fix for #4224

dos65 avatar Aug 08 '22 13:08 dos65

Thank you very much @dos65 @vzmerr ! I'm considering maybe we should revert type completions PRs for now, and retry introducing the feature in the next release (0.11.9?).

  • https://github.com/scalameta/metals/pull/4174
  • https://github.com/scalameta/metals/pull/4223

As @vzmerr mentioned

Also, this is at the last minute, what if it introduces other problems? The regression can be solved by simply adding || sym.isTerm in isNotClassOrTraitOrTheyAreValidForPos

I'm worried about introducing another problem by this PR (even if adding || sym.isTerm in isNotClassOrTraitOrTheyAreValidForPos thing solves this issue) or maybe there's another issue related to type completion. I feel it would be safer if we skip introducing type completion for 0.11.8 and rework for 0.11.9 What do you think about it? @dos65 @vzmerr FYI @tgodzik @ckipp01

tanishiking avatar Aug 09 '22 05:08 tanishiking

I'm considering maybe we should revert type completions PRs for now, and retry introducing the feature in the next release (0.11.9?).

@tanishiking Yep, good idea. It seems that we need an additional time to cover all cases (like patterns in case def but I think there should be more) properly and test them before release.

dos65 avatar Aug 09 '22 09:08 dos65

Thank you, everyone. Let's revert those PRs for now and go on the release.

tanishiking avatar Aug 09 '22 09:08 tanishiking

Thank you very much @dos65 @vzmerr ! I'm considering maybe we should revert type completions PRs for now, and retry introducing the feature in the next release (0.11.9?).

As @vzmerr mentioned

Also, this is at the last minute, what if it introduces other problems? The regression can be solved by simply adding || sym.isTerm in isNotClassOrTraitOrTheyAreValidForPos

I'm worried about introducing another problem by this PR (even if adding || sym.isTerm in isNotClassOrTraitOrTheyAreValidForPos thing solves this issue) or maybe there's another issue related to type completion. I feel it would be safer if we skip introducing type completion for 0.11.8 and rework for 0.11.9 What do you think about it? @dos65 @vzmerr FYI @tgodzik @ckipp01

Yes, I think this is the best route. There will be enough time to see if also my new PR can be reworked on this one; and whether this new approach can catch and cover all the cases.

vzmerr avatar Aug 09 '22 10:08 vzmerr