-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add command component sync
#607
Merged
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
This method creates a MultiDependency and Component object from the given clone URL and name and checks out the requested version.
This should ensure that we properly manage multiple packages in a single repo when creating `Package` objects via `clone()`.
This ensures that the type checker is happy if we have a variable of type `Type[Templater]` and call `from_existing()` on that variable.
Prepare implementation to also work for `component sync`.
This is pretty much a carbon copy of `package sync`
simu
force-pushed
the
feat/component-sync
branch
from
August 24, 2022 15:53
d9777aa
to
2ddb064
Compare
We add a helper which returns the passed object's type name in lower-case. This avoids the need for using `instanceof()` to use the correct dependency identifier ('component' or 'package') in the dependency sync outputs.
simu
force-pushed
the
feat/component-sync
branch
from
August 25, 2022 08:27
e8b6bfc
to
331f99f
Compare
glrf
approved these changes
Aug 25, 2022
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 PR refactors the implementation of
package sync
to be generic over the Commodore dependency types (Component
andPackage
) and their corresponding templating types (base classTemplater
). This allows us to use the exact same code with slightly different invocations to implement bothpackage sync
andcomponent sync
. Currently we don't even provide wrapper functions for the refactoredsync_dependencies()
but instead explicitly call it with the appropriate classes as arguments.Additionally, we ensure that
Component
andPackage
provide a common interface for base operations required bysync_dependencies()
. Side-note: we should introduce a common base class for the two classes (#608).Checklist
bug
,enhancement
,documentation
,change
,breaking
,dependency
as they show up in the changelog