-
Notifications
You must be signed in to change notification settings - Fork 10
Feature: Readonly bindings #2240
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
base: main
Are you sure you want to change the base?
Conversation
9d0dc96 to
760e30f
Compare
3a4c1d9 to
3cba36e
Compare
Test Results132 files - 109 132 suites - 109 46m 38s ⏱️ - 1m 17s Results for commit acaa115. ± Comparison against base commit 2ee2728. This pull request removes 632 and adds 6 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
3cba36e to
7cd12ec
Compare
760e30f to
14563d4
Compare
c0e7dc3 to
280bab0
Compare
JVM coverage report
|
| class SolutionProducer(private val myProject: IMPSProject) { | ||
|
|
||
| fun create(name: String, id: ModuleId): Solution { | ||
| fun create(name: String, id: ModuleId, readOnly: Boolean = false): Solution { |
Check warning
Code scanning / detekt
The function create is missing documentation.
| } | ||
|
|
||
| fun create(namespace: String, id: ModuleId, moduleDir: IFile): Solution { | ||
| fun create(namespace: String, id: ModuleId, moduleDir: IFile, readOnly: Boolean): Solution { |
Check warning
Code scanning / detekt
The function create is missing documentation.
| private fun IWritableNode.unwrap() = if (this is NodeWrapper) this.node else this | ||
|
|
||
| inner class NodeWrapper(private val model: IMutableModel, val node: IWritableNode) : IWritableNode by node, ISyncTargetNode { | ||
| open inner class NodeWrapper(private val model: IMutableModel, val node: IWritableNode) : IWritableNode by node, ISyncTargetNode { |
Check warning
Code scanning / detekt
NodeWrapper is missing required documentation.
| private fun IWritableNode.unwrap() = if (this is NodeWrapper) this.node else this | ||
|
|
||
| inner class NodeWrapper(private val model: IMutableModel, val node: IWritableNode) : IWritableNode by node, ISyncTargetNode { | ||
| open inner class NodeWrapper(private val model: IMutableModel, val node: IWritableNode) : IWritableNode by node, ISyncTargetNode { |
Check warning
Code scanning / detekt
Class 'NodeWrapper' with '15' functions detected. Defined threshold inside classes is set to '11'
| private fun IWritableNode.unwrap() = if (this is NodeWrapper) this.node else this | ||
|
|
||
| inner class NodeWrapper(private val model: IMutableModel, val node: IWritableNode) : IWritableNode by node, ISyncTargetNode { | ||
| open inner class NodeWrapper(private val model: IMutableModel, val node: IWritableNode) : IWritableNode by node, ISyncTargetNode { |
Check warning
Code scanning / detekt
The property node is missing documentation.
mps-sync-plugin3/src/main/kotlin/org/modelix/mps/sync3/SyncTargetModel.kt
Fixed
Show fixed
Hide fixed
mps-sync-plugin3/src/main/kotlin/org/modelix/mps/sync3/SyncTargetModel.kt
Fixed
Show fixed
Hide fixed
|
we tested it on this branch. In 18.1.0-readonly-bindings-SNAPSHOT, we observed the following exceptions: |
280bab0 to
e985e70
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
detekt found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
e985e70 to
9922f41
Compare
98fae1d to
c2bd845
Compare
When there are multiple active bindings, changes in the secondary repositories resulted in an exception.
If a solution is marked as read-only, then MPS doesn't allow creating models anymore and the synchronizer itself can't write to these solutions. I also removed the `readOnly` property from the metamodel. It has no semantic meaning and should be derived from the binding configuration, not from the stored data.
a023ea4 to
fe13904
Compare
When the repository of a read-only binding changes, all local changes are dropped and the new remote version is applied.
fe13904 to
acaa115
Compare
Changes
Todos