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: courses/RascalAmendmentProposals/RAP14/RAP14.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ sidebar_position: 14
12
12
13
13
## Abstract
14
14
15
-
The question this RAP answers is this: given two modules; L and C, where L is a “library module” and C is a “client” module that imports or extends L, **which changes in L do not break C**?
15
+
The question this RAP answers is this: given two modules; L and C, where L is a “library module” and C is a “client” module that imports or extends L, **which changes in L do not break C**? If L does not break any C, then it is said to be _backward compatible_.
16
16
17
17
In other words, under which circumstances is L’ (the next version of L) backwards compatible with L for *any* C’ that depends on L where C’ is equal to C only that it is configured now to depend on L’?
18
18
@@ -44,16 +44,16 @@ This specification is inspired by the [Java Language Specification](https://docs
44
44
**Definitions**
45
45
46
46
47
-
***Breaking module changes:** For a module to “break” means that clients do not compile anymore without errors, or throws exceptions during linking or loading.
47
+
***Breaking module changes:** For a module to “break” means that clients do not _compile_ anymore without _errors+, or _throw exceptions_ during _linking_ or _loading_.
48
48
* Semantics may change, for example new exceptions may be thrown at run-time, but we still accept the change as non-breaking.
49
49
* The “breaking” is an aspect of the *external interface of a module*. It should still work well enough to be called and interacted with, following the interfaces of the previous version.
50
50
* No more demands are made on non-breaking module updates.
51
51
* A **source module** M is represented by the Rascal source code of a module in a **.rsc file**
52
52
* A **binary module** M is represented by these files:
53
53
* A **.tpl file** in a target folder or jar file
54
-
* A **.class file** in a target folder or jar file
54
+
* A **.class file** in a target folder or jar file (Open Question: can there be more .class files for a single module (happens with nested classes for example, or lambda's?)
55
55
* A **.constants** file in a target folder or jarfile
56
-
* It is assumed that Rascal guarantees these 3 files to always be in-sync.
56
+
* It is assumed that the Rascal compiler guarantees these 3 files to always be in-sync.
57
57
* One binary module is always generated from one source module
58
58
* A library module L’ is either **import-compatible** or **extend-compatible** (or both) with its previous version L.
59
59
* Import-compatibility implies that all client modules C that *import* L do not break with L’.
@@ -64,13 +64,13 @@ This specification is inspired by the [Java Language Specification](https://docs
64
64
* Every client module C has (only) to be recompiled (against the binary module) L’, without any changes to the source module C, for L’ to be source-compatible with any C.
65
65
* x-Incompatibility is the logical inverse of x-compatibility, with x from {import, extend, source, binary}
66
66
* In the cartesian product *{source,binary} x {import, extend}* are four semantically relevant compatibility situations.
67
-
* It is good to remember that an library writer can not decide whether the client will extend or import their module,
67
+
* It is good to remember that a library writer can not decide whether the client will extend or import their module,
68
68
* and vice versa, a client writer can not decide whether the next version of the library they use is binary or source compatible.
69
69
***Formal compatibility** versus **actual compatibility**
70
70
***Formal x-compatibility** of L/L’ reasons about all the possible (hypothetical) clients C that would upgrade to L’
71
71
***Actual x-compatibility** of L/L’ reasons about the actual real uses of L in all existing real-world clients of L that would upgrade to L’
72
-
* The current document is exclusively about **formal x-compatibility\!**
73
-
* The link between compatibility and **semantic versioning** is that incompatible projects must update their major versions, and 0.x projects their minor versions *always* when they have incompatible modules.
72
+
***The current document is exclusively about formal x-compatibility\!** So it is about the guarantees made about a library module L, and not about whether the changed parts of L have ever been used by any clients.
73
+
***The link between compatibility and semantic versioning** is that incompatible projects must update their major versions, and 0.x projects their minor versions *always* when they have incompatible modules.
74
74
* This will allow checkers to warn early for breaking combinations of packages and their versions.
75
75
* This will allow the run-time system to assume the latest minor/patch version within each major version to always be compatible with each other and load these in case of conflicts in the search path.
76
76
@@ -152,6 +152,6 @@ Given the syntax and semantics of Rascal, here we list concrete changes to libra
152
152
153
153
## References
154
154
155
-
[^1]: Note that RAP 6, when implemented, would remove this incompatibility. It would become extend-incompatible with alternative removal only.
155
+
[^1]: Note that ((RAP6)), when implemented, would remove this incompatibility. It would become extend-incompatible with alternative removal only.
156
156
157
-
[^2]: Note that RAP 6, when implemented, would remove this incompatibility. It would become extend-incompatible with alternative addition only.
157
+
[^2]: Note that ((RAP6)), when implemented, would remove this incompatibility. It would become extend-incompatible with alternative addition only.
0 commit comments