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

ScalafmtRunner: use Future, not .par #4743

Merged
merged 1 commit into from
Jan 27, 2025
Merged

Conversation

kitbellew
Copy link
Collaborator

No description provided.

@kitbellew kitbellew force-pushed the 4744 branch 3 times, most recently from c54b00d to e5469dd Compare January 26, 2025 23:29
@kitbellew kitbellew changed the title ScalafmtCoreRunner: use Future, not .par ScalafmtRunner: use Future, not .par Jan 26, 2025
termDisplay.stop()
exitCode.get()
runInputs(options, inputMethods, termDisplayMessage) { inputMethod =>
import org.scalafmt.sysops.PlatformCompat.executionContext
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curiously, do we also enable multithreading in Scala Native as well this way? Maybe we don't need the separate executionContext anymore?

Maybe we can remove compatPar now also?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. during building i see messages about multithreading enabled, perhaps we could somehow make it explicit
  2. compatPar will be removed but this is not the last place yet
  3. executionContext I'd keep in case we want to define a custom (i was playing with it) or support scala.js (it uses a different one)

i can't see much difference in speed in community test running, but it felt to me much faster when i ran the result of sbt cli/assembly with local snapshot version (forcing core runner, instead of dynamic).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

during building i see messages about multithreading enabled, perhaps we could somehow make it explicit

I think it's automatically disabled when not needed, so no need to make it explicit I guess?

i can't see much difference in speed in community test running, but it felt to me much faster when i ran the result of sbt cli/assembly with local snapshot version (forcing core runner, instead of dynamic).

Och, interesting! Do you mean the JVM version?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, the JVM. native was even faster but i didn't check how native performed without this change.

@kitbellew kitbellew merged commit a9175bb into scalameta:main Jan 27, 2025
31 checks passed
@kitbellew kitbellew deleted the 4744 branch January 27, 2025 18:15
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

Successfully merging this pull request may close these issues.

2 participants