colors (colours) not working on windows 10 · Issue #40 · softwaremill/scala-clippy · GitHub
Skip to content
This repository was archived by the owner on Mar 27, 2023. It is now read-only.
This repository was archived by the owner on Mar 27, 2023. It is now read-only.

colors (colours) not working on windows 10 #40

Open

Description

@cavapoo2

I followed the instructions on setting up. Seemed to install fine, also running (clippyColorsEnabled) in sbt came back as true. I tried using these terminals cmd, gitmsys and powershell. The colors seems the same as before.

Activity

  1. cavapoo2 commented on Feb 1, 2017

    @cavapoo2
    Author

    note it might be partially working. when compile error occurs on long line, then function name is coloured yellow, and towards the end of the line it changes to purple. if I reduce the one long line to 2 lines, then this time the function name is not coloured yellow, the purple towards the end of the line is still purple.

  2. cavapoo2 commented on Feb 1, 2017

    @cavapoo2
    Author

    screenshot 1

  3. kciesielski commented on Feb 1, 2017

    @kciesielski
    Member

    Thanks for reporting @arobson73
    @adamw I did some initial investigation. For some reason the Ammonite highlighter doesn't properly use the fansi.Attr.Reset param passed here: https://github.com/softwaremill/scala-clippy/blob/master/plugin/src/main/scala-2.11/com/softwaremill/clippy/DelegatingPosition.scala#L19
    Changing to fansi.color.Reset ot fansi.Color.makeAttr(Console.RESET, 0) doesn't do the trick either.

    One possible but risky workaround would be to use the "light gray" color here instead of "Reset". However, this may affect output if someone uses custom terminal colors instead of light gray.
    I built a snapshot release with this workaround applied.
    @arobson73 could you try clippy version 0.5.1-SNAPSHOT? First, please make sure you have snapshot resolver added, for example in your .sbt/clippy.sbt file (the same place where you have defined clippyColorsEnabled := true):

    resolvers += 
      "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
  4. cavapoo2 commented on Feb 2, 2017

    @cavapoo2
    Author

    import com.softwaremill.clippy.ClippySbtPlugin._
    resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
    clippyColorsEnabled := true

    the above is now in my ~.sbt\0.13\build.sbt
    is this correct ?
    still seems to grab the 0.5.0 version
    [debug] Calling Scala compiler with arguments (CompilerInterface):
    [debug] -P:clippy:colors=true
    [debug] -Xplugin:C:\Users\andy.ivy2\cache\com.softwaremill.clippy\plugin_2.12\jars\plugin_2.12-0.5.0-bundle.jar
    [debug] -bootclasspath

  5. kciesielski commented on Feb 2, 2017

    @kciesielski
    Member

    @arobson73 you also need to change version to 0.5.1-SNAPSHOT in .sbt/0.13/plugins/build.sbt

  6. cavapoo2 commented on Feb 2, 2017

    @cavapoo2
    Author

    yes tried that. here is my .sbt/0.13/plugins/build.sbt

    addSbtPlugin("com.softwaremill.clippy" % "plugin-sbt" % "0.5.1-SNAPSHOT")

    here is my .sbt/0.13/build.sbt

    resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
    import com.softwaremill.clippy.ClippySbtPlugin._
    clippyColorsEnabled := true

    here is the error I keep getting

    [info] Loading global plugins from C:\Users\andy.sbt\0.13\plugins
    [info] Updating {file:/C:/Users/andy/.sbt/0.13/plugins/}global-plugins...
    [info] Resolving com.softwaremill.clippy#plugin-sbt;0.5.1-SNAPSHOT ...
    [warn] module not found: com.softwaremill.clippy#plugin-sbt;0.5.1-SNAPSHOT
    [warn] ==== typesafe-ivy-releases: tried
    [warn] https://repo.typesafe.com/typesafe/ivy-releases/com.softwaremill.clippy/plugin-sbt/scala_2.10/sbt_0.13/0.5.1-SNAPSHOT/ivys/ivy.xml
    [warn] ==== sbt-plugin-releases: tried
    [warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.softwaremill.clippy/plugin-sbt/scala_2.10/sbt_0.13/0.5.1-SNAPSHOT/ivys/ivy.xml
    [warn] ==== local: tried
    [warn] C:\Users\andy.ivy2\local\com.softwaremill.clippy\plugin-sbt\scala_2.10\sbt_0.13\0.5.1-SNAPSHOT\ivys\ivy.xml
    [warn] ==== public: tried
    [warn] https://repo1.maven.org/maven2/com/softwaremill/clippy/plugin-sbt_2.10_0.13/0.5.1-SNAPSHOT/plugin-sbt-0.5.1-SNAPSHOT.pom
    [info] Resolving org.fusesource.jansi#jansi;1.4 ...
    [warn] ::::::::::::::::::::::::::::::::::::::::::::::
    [warn] :: UNRESOLVED DEPENDENCIES ::
    [warn] ::::::::::::::::::::::::::::::::::::::::::::::
    [warn] :: com.softwaremill.clippy#plugin-sbt;0.5.1-SNAPSHOT: not found
    [warn] ::::::::::::::::::::::::::::::::::::::::::::::
    [warn]
    [warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
    [warn] com.softwaremill.clippy:plugin-sbt:0.5.1-SNAPSHOT (scalaVersion=2.10, sbtVersion=0.13)
    [warn]
    [warn] Note: Unresolved dependencies path:
    [warn] com.softwaremill.clippy:plugin-sbt:0.5.1-SNAPSHOT (scalaVersion=2.10, sbtVersion=0.13) (C:\Users\andy.sbt\0.13\plugins\build.sbt#L1-2)
    [warn] +- org.scala-sbt:global-plugins:0.0 (scalaVersion=2.10, sbtVersion=0.13)
    [trace] Stack trace suppressed: run last :update for the full output.
    [error] (
    :update) sbt.ResolveException: unresolved dependency: com.softwaremill.clippy#plugin-sbt;0.5.1-SNAPSHOT: not found
    Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?

  7. kciesielski commented on Feb 2, 2017

    @kciesielski
    Member

    @arobson73 looks like snapshots repo is not being used. Could you also add the resolver line:

    resolvers +=
     "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"

    to .sbt/0.13/plugins/build.sbt ?

  8. cavapoo2 commented on Feb 2, 2017

    @cavapoo2
    Author

    screenshot 2

    looks better now. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions