Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 26 2017 22:35
    olafurpg synchronize #947
  • May 26 2017 22:23
    olafurpg synchronize #947
  • May 26 2017 22:22
    olafurpg synchronize #947
  • May 26 2017 22:20
    olafurpg opened #947
  • May 26 2017 22:07
    olafurpg commented #943
  • May 26 2017 21:53

    olafurpg on v1.0.0-RC1

    (compare)

  • May 26 2017 21:46

    olafurpg on master

    Upgrade to non-broken metaconfi… Merge pull request #946 from ol… (compare)

  • May 26 2017 21:46
    olafurpg closed #946
  • May 26 2017 21:25
    olafurpg opened #946
  • May 26 2017 14:44

    olafurpg on master

    documentation fix: binPackParen… Merge pull request #945 from na… (compare)

  • May 26 2017 14:44
    olafurpg closed #945
  • May 26 2017 14:43
    olafurpg commented #943
  • May 26 2017 14:39
    olafurpg commented #943
  • May 26 2017 14:03
    pjrt commented #943
  • May 26 2017 13:36
    pjrt commented #943
  • May 26 2017 13:12
    nadavwr opened #945
  • May 25 2017 22:57
    ScalaWilliam commented #943
  • May 25 2017 21:34
    pauldraper commented #890
  • May 25 2017 21:34
    pauldraper commented #890
  • May 25 2017 17:23
    olafurpg commented #943
Eric K Richardson
@ekrich
Nice great to hear.
Anil Kumar Myla
@anilkumarmyla
sbt-scalafmt new release https://github.com/scalameta/sbt-scalafmt/releases/tag/v2.0.6 failed to publish, anyone looking into it?
Mikhail Chugunkov
@poslegm
@anilkumarmyla Sonatype returns 50x codes on publishing, I am trying to figure out what the problem is
mohnishkodnani
@mohnishkodnani

Hi,
With sbt-scalafmt 2.0.5 I am getting the following error when I run scalafmtCheck on my project. This is the first time I am running it, I would appreciate if someone could explain what the below error means.
[error] invariant failed: [error] when verifying parentCheckOk.&&(org.scalameta.`package`.debug(this, parentPrefix, destination)) [error] found that parentCheckOk is false [error] where TermAssignImpl = projections = parameters: _* [error] where destination = stats [error] where parentCheckOk = false [error] where parentPrefix = Term.Block [error] where this = projections = parameters: _*: <Filename>

Code where I think its complaining
def project(parameters: Parameter*) = { projections = parameters: _* this }

mohnishkodnani
@mohnishkodnani
"this" is in the next line the markup got jumbedup.apologies.
Matthew Rothenberg
@mroth

With the new v2.1.0 release I'm suddenly seeing an error in attempting to compile via sbt cli/assembly:

[error] (cli / assembly) deduplicate: different file contents found in the following:
[error] /home/runner/.cache/coursier/v1/https/repo1.maven.org/maven2/io/get-coursier/interface/0.0.12/interface-0.0.12.jar:reflect.properties
[error] /home/runner/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-reflect/2.12.8/scala-reflect-2.12.8.jar:reflect.properties

CI output: https://github.com/mroth/scalafmt-native/runs/242381340#step:3:2325

Any ideas?

Mikhail Chugunkov
@poslegm
@mroth try to do it with coursier instead of sbt cli/assembly
CLASSPATH=$(coursier fetch org.scalameta:scalafmt-cli_2.12:2.1.0 | paste -s -d: -)
native-image -cp $CLASSPATH org.scalafmt.cli.Cli -H:+ReportUnsupportedElementsAtRuntime
Matthew Rothenberg
@mroth
@poslegm is that the new preferred invocation for compiling? or a means of debugging the current issue? (e.g. should I be manually running that to get debug output to help figure out the issue and reporting back, or is that actually how end-users are suppose to compile now and I should update CI scripts for it?)
Mikhail Chugunkov
@poslegm

@mroth It's the simplest way to get assembled and runnable cli. So it can be used in CI. But now I noticed that after scalameta/scalafmt#1511 GraalVM build is broken :c

Warning: Aborting stand-alone image build. Unsupported features in 5 methods
Detailed message:
Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Invoke with MethodHandle argument could not be reduced to at most a single call: java.lang.invoke.MethodHandle.bindTo(Object)
...

I created issue about it scalameta/scalafmt#1514

Matthew Rothenberg
@mroth
@poslegm Thanks! I've updated my automated builds to do something similar based on that method (which also breaks in the same way as per your issue).
Moritz Bust
@Busti
Is there a rule to add a space before a context-bound colon :?
trait Foo[F[_]: Functor] // before
trait Foo[F[_] : Functor] // after
Currently it is automatically removed when formatting.
Ah there is spaces.beforeContextBoundColon = Always
Eric K Richardson
@ekrich

Hi, was attempting to switch to 2.1.0 from 1.5.1 and seeing allot of the following:

-    Compile / compile / javacOptions ++= Seq("-source",
-                                             "1.8",
-                                             "-target",
-                                             "1.8",
-                                             "-g",
-                                             "-Xlint:unchecked"),
+    Compile / compile / javacOptions ++= Seq(
+      "-source",
+      "1.8",
+      "-target",
+      "1.8",
+      "-g",
+      "-Xlint:unchecked"
+    ),

Is this the new standard - I am ok with it if this is the way to go?

Eric K Richardson
@ekrich
Seems like the docs change log is at 2.0.1 not 2.1.0.
BTW, this is my file
version = 2.1.0
style = defaultWithAlign
docstrings = JavaDoc
assumeStandardLibraryStripMargin = true
project.git = true
# manually exclude files to format.
project.excludeFilters = [
   sharedScala3
]
Eric K Richardson
@ekrich
@olafurpg This will affect Scala Native too when we upgrade and I know people don’t like these white space changes.
Ólafur Páll Geirsson
@olafurpg
@ekrich the defaults for alignment changed
you can add the following to get the old behavior
align.openParenCallSite = true
Eric K Richardson
@ekrich
@olafurpg Thanks, I know you changed defaults before but only after much deliberation that the default was a more standard format. I accepted the default for my project :smile:
YulawOne
@YulawOne
Hi everyone,
As per https://scalameta.org/scalafmt/docs/faq.html, it said Scalafmt takes liberty to add/remove newlines, making your entire codebase look consistent., but is it possible to opt-in this behavior and give an ability to decide on line breaks back to the developer?
Henri Cook
@henricook
Hi all
Does anyone know how i can add custom resolvers to scalafmt-dynamic?
I want it to resolve from my CI/CD dependency proxy instead of the public internet
or can i just turn off dynamic, or pre-load the binary on the image or something? It's a bit of a CI/CD nightmare
Henri Cook
@henricook
I created a small PR that I hope will mean COURSIER_REPOSITORIES gets honoured: https://github.com/scalameta/scalafmt/pull/1524/files
Diego E. Alonso Blas
@diesalbla
Good morning.
I have found a memory allocation hotspot in scalafmt, which may be solved by the upgrade to 2.13.x, scalameta/scalafmt#1522 but could also be solved separately.
I am right to assume that, once that PR is merged, all versions of scalafmt published will have been compiled with Scala 2.13.x,
no matter what the scalaVersion of the project where scalafmt is applied will be?
Ólafur Páll Geirsson
@olafurpg
@diesalbla correct, scalafmt runs in its own classloader regardless of what scala version the build is using
Just merged the 2.13 upgrade
@/all we are experimenting with using Discord instead of Gitter, feel free to ask questions in the #scalafmt channel here https://discord.gg/N43mbnH
If you have thoughts on Discord vs. other Gitter alternatives, please share your thoughts here https://users.scala-lang.org/t/can-we-have-an-official-scala-discord-server/5157
Diego E. Alonso Blas
@diesalbla
@olafurpg May I suggest another release soon? That hotspot may be taking over half the heap memory of any scalafmt process.
Diego E. Alonso Blas
@diesalbla
I am trying to run a scalafmt task (with sbt-scalafmt) with the new master version of scalafmt-core, using the binary obtained by a publishLocal .
I am not sure if a dependencyOverrides would do it, since the plugin depends on this -dynamic package...
Ólafur Páll Geirsson
@olafurpg
I'm not sure if sbt-scalafmt will automatically pick up the 2.13 version now, we should probably change
@poslegm what do you think about cutting a new release with the 2.13 support?
Diego E. Alonso Blas
@diesalbla
I think I would first like just to try it out, using the newer master (built on Scala 2.13) on the scalafmt SBT task of a project build,
just to see if the memory issue is solved with just that.
Thing is, the scalafmt-dynamic dependency does not seem to be exactly like other JAR dependencies , so I am not sure how to link it t a binary of the current master . Do you know how could I do that?
Mikhail Chugunkov
@poslegm
@olafurpg I am going to cut 2.2.0-RC1 with Scala 2.13 soon :ok_hand:
Ólafur Páll Geirsson
@olafurpg
@diesalbla the CI releases a new version of scalafmt on every merge https://travis-ci.org/scalameta/scalafmt/jobs/599284887#L647
You can set version to that SNAPSHOT in .scalafmt.conf
the problem is that I believe sbt-scalafmt by default fetches the scalafmt_2.12 artifact instead of scalafmt_2.13
using the 2.13 artifact will require changes in sbt-scalafmt
@poslegm awesome! :ok_hand:
Travis Brown
@travisbrown
I just updated to 2.1.1 and it's changing new Foo(x)(y) to new Foo(x) (y)
anyone know of the top of their head what config option this is? I can dig around but it wasn't obvious at a glance.
Ólafur Páll Geirsson
@olafurpg
@travisbrown this was a regression from scalameta/scalafmt#1516 that has been fixed in scalameta/scalafmt#1535
Ólafur Páll Geirsson
@olafurpg
@/all I wrote up a proposal for how to continue evolving the formatting behavior while trying to avoid configuration bloat https://github.com/scalameta/scalafmt/pull/1431#pullrequestreview-304421797 comments are welcome