375 Members
Discord bridge for scalameta/scalafmt3 Servers

Load older messages

16 Feb 2024
@_discord_608368372446527663:t2bot.iokmarek changed their profile picture.13:37:21
@_discord_583167330566275072:t2bot.iosethtisue changed their profile picture.16:30:01
17 Feb 2024
@_discord_734849617820254331:t2bot.iovelvetbaldmime changed their profile picture.13:56:08
19 Feb 2024
@_discord_659458872486002691:t2bot.iofel_her changed their profile picture.20:48:55
@_discord_639859187773603841:t2bot.iomatthiasberndt Today, apparently 🥳 23:00:02
@_discord_639859187773603841:t2bot.iomatthiasberndt Thanks everybody who worked on that! 23:00:08
20 Feb 2024
@_discord_839723269250875422:t2bot.iomtomko joined the room.16:35:15
@_discord_839723269250875422:t2bot.iomtomko 16:35:15
@_discord_839723269250875422:t2bot.iomtomko Has anyone had trouble with scalafmt trying to rewrite scala 2 constructs into scala 3 in their build.sbt files? 16:35:16
@_discord_392428121342869534:t2bot.ioTomasz Godzik That shouldn't happen 😱 there is a separate dialect for SBT. Maybe you overrode it by mistake? 16:39:59
runner.dialect = scala3
style = IntelliJ

maxColumn = 120
newlines.topLevelStatementBlankLines = [
  { blanks = 1 }
project.git = true
rewrite.rules = [AvoidInfix, RedundantBraces, RedundantParens, Imports, SortModifiers]
rewrite.imports.sort = ascii
rewrite.redundantBraces.generalExpressions = false
rewrite.redundantBraces.includeUnitMethods = false
rewrite.redundantBraces.maxBreaks = 16
rewrite.redundantBraces.stringInterpolation = true
rewrite.scala3.convertToNewSyntax = true
rewrite.scala3.removeOptionalBraces = oldSyntaxToo
rewrite.scala3.insertEndMarkerMinLines = 8
@_discord_392428121342869534:t2bot.ioTomasz Godzik looks like a bug then, we might not be doing some checks 16:51:39
@_discord_839723269250875422:t2bot.iomtomko I can try to make a tiny repository that repros it. 16:52:21
@_discord_392428121342869534:t2bot.ioTomasz Godzik would be also good to remove any non relevant settings 16:53:15
@_discord_839723269250875422:t2bot.iomtomko yes, working on it 16:55:32
@_discord_839723269250875422:t2bot.iomtomko https://github.com/mtomko/scalafmt-repro2 is pretty minimal, I can open an issue if you like 17:01:12
@_discord_839723269250875422:t2bot.iomtomko I have submitted patches before but it was mystifying, if I have a minute I might poke at it, though. 17:04:36
@_discord_839723269250875422:t2bot.iomtomko * I have submitted patches before but it was challengig, if I have a minute I might poke at it, though. 17:04:43
@_discord_839723269250875422:t2bot.iomtomko * I have submitted patches before but it was challenging, if I have a minute I might poke at it, though. 17:04:50
@_discord_673627799717937152:t2bot.iokitbellew I might be getting senile but I'm not aware of any scalafmt rule that introduces fewer braces. are you certain it's this formatter? 18:37:41
@_discord_392428121342869534:t2bot.ioTomasz Godzik I think that's just optional braces, that's with the new keyword 18:39:31
@_discord_839723269250875422:t2bot.iomtomko Yes, see here: https://scalameta.org/scalafmt/docs/configuration.html#rewritescala3removeoptionalbraces 18:53:30
@_discord_839723269250875422:t2bot.iomtomko I think that's maybe new in 3.8.0? 18:53:35
@_discord_839723269250875422:t2bot.iomtomko or did you mean the new keyword in the build.sbt? 18:54:03
@_discord_691992332245008424:t2bot.ioigor.ramazanov https://scalameta.org/scalafmt/docs/configuration.html#runnerdialectoverride

@_discord_691992332245008424:t2bot.ioigor.ramazanov https://scalameta.org/scalafmt/docs/configuration.html#fileoverride 19:56:13
@_discord_839723269250875422:t2bot.iomtomko Are you suggesting that I need to configure scalafmt explicitly to recognize the difference between an sbt and a scala file? Because the documentation says that "since v3.1.0, the runner.dialect parameter is required to be specified explicitly." It looks like I could specify a fileOverride to switch for sbt and scala files, but it also feels like something that should be built-in? 20:44:30
21 Feb 2024
@_discord_691992332245008424:t2bot.ioigor.ramazanov It's perhaps not so simple as SBT uses Scala 2.12 while the codebase could use Scala 2.13 with various compiler flags changing syntax to make the syntax looking closer to Scala and ease migration.

Also, it's possible to use project/*.scala files to describe the build.
@_discord_691992332245008424:t2bot.ioigor.ramazanov But I'm not sure 01:15:06
@_discord_691992332245008424:t2bot.ioigor.ramazanov I personally use fileOverride everywhere where needed to be explicit and it seems ok. Never had a need to change it 01:16:26

There are no newer messages yet.

Back to Room ListRoom Version: 9