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

sbt: scalafixEnable resets sbt session settings #986

Open
tuures opened this issue Oct 4, 2019 · 2 comments
Open

sbt: scalafixEnable resets sbt session settings #986

tuures opened this issue Oct 4, 2019 · 2 comments

Comments

@tuures
Copy link

tuures commented Oct 4, 2019

Running scalafixEnable resets all configuration changes that were done in sbt console (in the session).

For example if I modify scalacOptions (set scalacOptions in ThisBuild := ...) and then run scalafixEnable, the scalacOptions are reseted back to the project configuration, which unexpected and very inconvenient.

I suspect this is because here:

https://github.com/scalacenter/sbt-scalafix/blob/e171dca59d8fc3fd3fee2997dfc2634634ecfa10/src/main/scala-sbt-1.0/sbt/internal/sbtscalafix/Compat.scala#L14

appendWithoutSession is used instead of appendWithSession. Is there something that would prevent from using appendWithSession?

@bjaglin
Copy link
Collaborator

bjaglin commented Nov 4, 2020

appendWithoutSession is used instead of appendWithSession. Is there something that would prevent from using appendWithSession?

I don't think so, feel free to open a PR!

@bjaglin
Copy link
Collaborator

bjaglin commented Mar 2, 2021

Because of sbt/sbt#5459, the suggested change might not be enough.

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

No branches or pull requests

2 participants