!TYZBVVPLZgmBKzUodS:matrix.org

scalacenter/scalafix

429 Members
Discord for scalacenter/scalafix3 Servers

Load older messages


SenderMessageTime
12 May 2024
@_discord_1005172653545488517:t2bot.iobjaglin * Hey! Indeed, --check only returns 0 when there is no ERROR diagnostic nor pending rewrite. There is no way to have a "fatal warnings" behavior with the CLI at the moment. I suggest you open a GitHub issue to discuss semantics. Happy to provide pointers to help you implement it once we've agreed on that. 17:10:17
@_discord_1005172653545488517:t2bot.iobjaglin * Hey! Indeed, --check only returns 0 when there is no ERROR diagnostic nor pending rewrite. There is no way to have a "fatal warnings" behavior with the CLI at the moment. I suggest you open a GitHub issue to discuss UI/semantics. Happy to provide pointers to help you implement it once we've agreed on that. 17:10:45
@_discord_242339905034911745:t2bot.ioJavier M joined the room.20:02:18
13 May 2024
@_discord_842266185873621022:t2bot.iosatorg joined the room.00:01:24
15 May 2024
@_discord_1034169728001912952:t2bot.iokawaxte joined the room.07:09:19
16 May 2024
@_discord_173205095863943168:t2bot.io.sandwichwizard šŸ‘ thanks, just opened https://github.com/scalacenter/scalafix/issues/2000 12:26:35
@_discord_173205095863943168:t2bot.io.sandwichwizard I'm also curious if there's a way to disable the UnusedScalafixSuppression warnings from the CLI?

for context, I'm writing a pre-commit hook that will only run syntactic rules for the sake of speed (all rules are run CI), so sometimes a suppression appears unused because it's for a semantic rule
12:50:18
@_discord_1240667701685387370:t2bot.iorohith_02_ joined the room.14:22:10
@_discord_601140815187935274:t2bot.iosake92 changed their display name from sake92#0 to sake92.15:10:19
17 May 2024
@_discord_195829958839500800:t2bot.ioVlad changed their profile picture.22:00:48
19 May 2024
@_discord_577714332570222613:t2bot.iobste_ joined the room.22:20:34
20 May 2024
@_discord_1022216245816336486:t2bot.iojwgcooke joined the room.16:07:14
@_discord_270243703015079946:t2bot.iobalmungsan3 joined the room.18:04:54
@_discord_270243703015079946:t2bot.iobalmungsan3 scalafix + metals + vscode formatting sbt files using Scala 3 syntax.

Today I realized that after adding this setting to my vscode profile:

"editor.codeActionsOnSave": {
  "source.organizeImports": "explicit" // "always" | "never"
}


When editing a sbt file, after closing it, the OrganizeImports rule of Scalafix would get applied and it would modify my imports using the Scala 3 targetDialect (as defined by my .scalafix.conf file).
I would like to be able to configure some fileOverride rules, similar to scalafmt to force the Scala 2 dialect on sbt files.

I wonder if auto would already do that? But I am wary of using that given that it doesn't work for cross-compilation, so even if it would work for the current app I am working on, this issue may happen in the future again.
18:04:55
@_discord_270243703015079946:t2bot.iobalmungsan3 18:04:55
21 May 2024
@_discord_639859187773603841:t2bot.iomatthiasberndt Why? Newer Scala 2 versions support the Scala 3 import syntax, so you should be able to migrate it 08:28:06
@_discord_639859187773603841:t2bot.iomatthiasberndt But I wouldn't recommend organising imports on save anyway. It slows things down and it doesn't work when your codebase doesn't compile and then you get annoying error messages and whatnot. And of course ā€œorganized importsā€ provide precisely zero business value, so any amount of time spent on imports is wasted. 08:33:14
@_discord_740114047684313110:t2bot.iojypma changed their display name from netwa1ker to jypma.13:16:19
@_discord_270243703015079946:t2bot.iobalmungsan3 I don't want to use Scala 3 syntax on a Scala 2 file.
Also, while it does support .* rather than ._, there seems to be issues with aliases.
15:49:23
@_discord_270243703015079946:t2bot.iobalmungsan3 CI will check for formatting, including import order.
The less I have to remember to run a format action before commiting and pushing, the better.
15:50:08
@_discord_270243703015079946:t2bot.iobalmungsan3
And of course ā€œorganized importsā€ provide precisely zero business value, so any amount of time spent on imports is wasted.
Whatever you say
15:50:29
@_discord_639859187773603841:t2bot.iomatthiasberndt It's not Scala 3 syntax if it can be compiled with Scala 2 šŸ˜› 15:51:00
@_discord_270243703015079946:t2bot.iobalmungsan3 Anyways, it seems I should open a issue with this if I want it to recieve attention? 15:51:33
@_discord_639859187773603841:t2bot.iomatthiasberndt So disable that check, it doesn't provide value 15:52:01
@_discord_270243703015079946:t2bot.iobalmungsan3 Whatever you say x2 15:52:32
@_discord_639859187773603841:t2bot.iomatthiasberndt There is no issue here, the syntax that it generates works 17:08:25
22 May 2024
@_discord_1005172653545488517:t2bot.iobjaglin There is no fileOverride feature at the moment, and it was never requested, so I am unsure it's worth the complexity.

I wonder if auto would already do that? But I am wary of using that given that it doesn't work for cross-compilation, so even if it would work for the current app I am working on, this issue may happen in the future again.

If you don't want to force Scala 3 dialect on all files, you should use either: Auto if your project does not cross-compile, or StandardLayout (the default) if it does. It won't cover all use-cases but hopefully most of them.
00:04:45
@_discord_843896430917320714:t2bot.ioim_bharadwajj joined the room.08:54:35
@_discord_264506688877494282:t2bot.iodos65 joined the room.11:42:29
@_discord_270243703015079946:t2bot.iobalmungsan3 Auto doesn't work. 16:22:12

Show newer messages


Back to Room ListRoom Version: 9