You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/drop-stdlib-forwards-bin-compat.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,6 +88,11 @@ Dropping forwards binary compatiblity allows adding new methods to existing clas
88
88
While this opens a big door in principle, I am certain that stability, consistency and caution will remain core considerations when discussing additions to the standard library.
89
89
However, I believe that allowing to (carefully) evolve the standard library is greatly beneficial for the Scala community.
90
90
91
+
Examples that came up in the past
92
+
- various proposals for new operations are here: https://github.com/scala/scala-library-next/issues and https://github.com/scala/scala-library-next/pulls
93
+
- addition of `ExecutionContext.opportunistic` in 2.13.4, which could not be made public: https://github.com/scala/scala/pull/9270
- new string interpolators: https://github.com/scala/scala/pull/8654
91
96
92
97
## Alternatives and Related Work
93
98
@@ -117,6 +122,16 @@ Concretely, a project might update one of its dependencies to a new version whic
117
122
If the project continues using an old version of sbt, the build tool will keep the Scala library pinned.
118
123
The new library might reference definitions that don't exist in the older Scala library, leading to linkage errors.
119
124
125
+
### Scala.js and Scala Native
126
+
127
+
Scala.js distributes a JavaScript version of the Scala library.
128
+
This artifact is currently released once per Scala.js version.
129
+
When a new Scala version comes out, a new Scala.js compiler is released, but the Scala library artifact continues to be used until the next Scala.js version.
130
+
This scheme does not work if the new Scala version has new definitions, so it needs to be adjusted.
131
+
Finding a solution for this problem is necessary and part of the implementation phase.
132
+
133
+
A similar situation might exist for Scala Native.
134
+
120
135
### Compiler and Library Version Mismatch
121
136
122
137
Defining the `scalaVersion` in a project would no longer pin the standard library to that exact version.
@@ -134,6 +149,11 @@ Because the build tool can update the Scala library version, a project might acc
134
149
This is safe, as the project's POM file will have a dependency on the newer version of the Scala library.
135
150
The same situation can appear with any other dependency of a project.
136
151
152
+
### Applications with Plugin Systems
153
+
154
+
In applications where plugins are dynamically loaded, plugins compiled with a new Scala library could fail to work correctly if the application is running with an older Scala library.
155
+
156
+
This is however not a new issue, the proposed change would just extend the existing problem to the Scala library.
0 commit comments