scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
230 stars 21 forks source link

value lookup is not a member of this.Context #12989

Closed nbauma109 closed 2 months ago

nbauma109 commented 2 months ago

Versions

Scala version: 2.12.8 to 2.12.19

Reproduction steps

  1. Clone scala ide project https://github.com/nbauma109/scala-ide/
  2. Launch ./build-all.sh

Or check the logs online https://github.com/nbauma109/scala-ide/actions/runs/8775079034/job/24076989923#step:4:3439

Problem

Because of the removal of Context.lookup() method, the project does not compile:

[ERROR] [Error] C:/Users/nicol/git/scala-ide/org.scala-ide.sdt.core/src/org/scalaide/core/internal/compiler/ScalaPresentationCompiler.scala:86: value lookup is not a member of this.Context

The method is used here:

https://github.com/scala-ide/scala-ide/blob/master/org.scala-ide.sdt.core/src/org/scalaide/core/internal/compiler/ScalaPresentationCompiler.scala#L86

On this commit, a long text describes implementation details and concerns, but does not mention a proper replacement for the method Context.lookup(). This might not be API, and the original developers might have lacked attention to that, but I'd appreciate to know what to use instead.

https://github.com/scala/scala/commit/dd0b8c6d6f1a740042b7c3bf6fce3b627035c24c

som-snytt commented 2 months ago

It's easy to search

https://github.com/scala/scala/blob/2.13.x/src/compiler/scala/tools/nsc/typechecker/Contexts.scala#L1281

and using github "blame" feature it's easy to hop backward to

https://github.com/scala/scala/blame/2dc5841638f8a48bace0084ac25baaef50e865f9/src/compiler/scala/tools/nsc/typechecker/Contexts.scala#L704

Questions (not bugs) should be directed at the discord chat or forum.