Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scalafmt 3.8.0 update: suspicous reformatting #3799

Closed
adamw opened this issue Feb 26, 2024 · 3 comments
Closed

Scalafmt 3.8.0 update: suspicous reformatting #3799

adamw opened this issue Feb 26, 2024 · 3 comments

Comments

@adamw
Copy link

adamw commented Feb 26, 2024

In an automated 3.8.0 update, which broke the build, I noticed some suspicious reformatting:

From:

data.workers.get(host) match {
           case None =>
             val workerQueue = new ArrayBlockingQueue[Url](32)
             worker(workerQueue, crawlerQueue)
             (data.copy(workers = data.workers + (host -> workerQueue)), workerQueue)
           case Some(queue) => (data, queue)
         }

to:

data.workers.get(host) match {
           case None =>
             val workerQueue = new ArrayBlockingQueue[Url](32)
             worker(workerQueue, crawlerQueue)(data.copy(workers = data.workers + (host -> workerQueue)), workerQueue)
           case Some(queue) => (data, queue)
         }

The intent was to first call worker(workerQueue, crawlerQueue), and then return a tuple. So the reformatting seems wrong.

See the full PR

@adamw
Copy link
Author

adamw commented Feb 26, 2024

Similar problems in tapir and in sttp

@kitbellew
Copy link
Collaborator

duplicate of #3789 and #3790.

@adamw
Copy link
Author

adamw commented Feb 26, 2024

Oh sorry, I didn't see anything in open issues and create a new one. Thanks, waiting for a release then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants