Organize Imports should be aware of SIP 18 scala.language imports
Organize Imports removes imports to scala.language because they appear to be unused.
A first step in support SIP 18 would be to simply ignore all imports from scala.language, and add full support for also adding these imports in a later step.
A first step in support SIP 18 would be to simply ignore all imports from scala.language, and add full support for also adding these imports in a later step.
Leave a comment
on 2013-01-03 01:23 *
By Mirko Stocker
Scala-Refactoring now ignores (i.e. keeps) imports to scala.language and language.
Ticket assignment reverted due to inactivity.
on 2015-09-03 01:57 *
By Simon Schäfer
Version changed from 2.1.0-M3-210 to 4.1.1
Status changed from New to Accepted
Move ticket to next milestone.
on 2016-04-19 17:56 *
By wpopielarski769697
Mirco could you tell me what is a relation between following snippet from CompilationUnitDependencies and this ticket?
// Always add the SIP 18 language imports as required until we can handle them properly
case Import(select @ Select(Ident(nme.scala_), `language`), feature) =>
feature foreach (selector => addToResult(Select(select, selector.name)))
on 2016-04-19 20:41 *
By Mirko Stocker
Sure, now whenever we find an import to scala.language, we add it to the required set of imports. This way, we don't lose any of these imports, this is just a work around until there is some way to figure out which features we'd need to import.
on 2016-09-19 15:22 *
By wpopielarski769697
how I see it is:
if
if
if
if
import scala.language.experimental.macros
then find macro tree/type/attachmentif
import scala.language.higherkinds
then find types parametrized by typesif
import scala.language.implicits
then find apply implicit views