-
Notifications
You must be signed in to change notification settings - Fork 90
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
Switch from generating scala.collection.Seq to scala.collection.immutable.Seq #150
Conversation
sbt-buildinfo has been using
|
But scala.Seq (or scala.collection.immutable.Seq if you prefer) is really what you want for immutable things, and what you want by default (after all, that's the whole reason why scala.Seq is now scala.collection.immutable.Seq, because it's a better default).
I don't think that switching a codebase to scala.collection.Seq is realistic, it's fine in a few cases, but to use it consistently in a codebase requires a huge refactoring and means fighting against the spirit of 2.13 (varargs, every library you're using which uses scala.Seq, ...). On the other hand, when moving from 2.12 to 2.13, I didn't have to do that many changes in my code, but I had to add a few |
What do you think about using concrete datatypes like Vector instead so it would be immutable for both pre-2.13 and 2.13+? |
That's also fine |
This seems like the most reasonable choice and works better with the default scala.Seq in 2.13.
I switched to scala.collection.immutable.Seq since that seems like the most natural choice, but happy to replace that with Vector if you prefer. |
Ignore Seq signature changes coming from the breaking change sbt/sbt-buildinfo#150
Ignore Seq signature changes coming from the breaking change sbt/sbt-buildinfo#150
No effect on 2.12, but on 2.13 this is what should be preferred and
makes the most sense since we're dealing with immutable values.