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/binary-api.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -239,7 +239,7 @@ Using references to `@publicInBinary` in inline code can cause binary incompatib
239
239
240
240
### Other concerns
241
241
242
-
* Tools that analyze inlined TASTy code might need to know about `@publicInBinary`. For example [MiMa](https://github.com/lightbend/mima/) and [TASTy MiMa](https://github.com/scalacenter/tasty-mima).
242
+
* Tools that analyze inlined TASTy code will need to know about `@publicInBinary`. For example [MiMa](https://github.com/lightbend/mima/) and [TASTy MiMa](https://github.com/scalacenter/tasty-mima).
243
243
244
244
## Alternatives
245
245
@@ -249,6 +249,20 @@ This annotation would generate an stable accessor. This annotation could be used
Currently, we already make `private[C]` public in the binary API but do not guarantee but do not have the same guarantees regarding binary compatibility.
255
+
For example, the following change is binary compatible but would remove the existence of the `private[C]` definition in the bytecode.
256
+
```diff
257
+
class C:
258
+
- private[C] def f: T = ...
259
+
```
260
+
We could change the rules to make all `private[C]` part of binary compatible to flag such a change as binary incompatible. This would imply that all these
261
+
methods can be accessed directly from inline methods without generating an accessor.
262
+
263
+
The drawback of this approach is that that we would need to force users to keep their `private[C]` methods even if they never used inline methods.
0 commit comments