-
Notifications
You must be signed in to change notification settings - Fork 301
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
SwiftPM: Make the model file dedicated for just the model and its parsing #8221
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81a41e6
to
168593c
Compare
mnonnenmacher
requested changes
Feb 2, 2024
plugins/package-managers/swiftpm/src/main/kotlin/SwiftPmModel.kt
Outdated
Show resolved
Hide resolved
Separate model mapping from parsing the model, to prepare making the package creating take both, lockfile entries and `swift package show-dependencies` entries, as input. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
The function is more closely related to the model. Apply the now possible visibility scope reductions. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Encapsulate the `json` instance within the model file. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Make `SwiftPmModel` dedicated to just the upstream swift models and it's parsing, by moving the mapping to ORT's model into `SwiftPM`. This simplifies refactoring and improves encapsulation as visibility can be reduced. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Move the public ones to the top. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
This is also part of mapping the upstream model to ORT's model. So, move it next to the related code. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
168593c
to
f2e8bd0
Compare
Signed-off-by: Frank Viernau <frank_viernau@epam.com>
mnonnenmacher
approved these changes
Feb 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This separates concerns, and ensures we have
SwiftPmModel
only be about the upstream data model and its parsing.Mapping this to ORT's model is moved out to the package manager implementation, which makes it easier to change that mapping in following changes.
See individual commits.
Part of: #8167.