-
Notifications
You must be signed in to change notification settings - Fork 44
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
[PRETEST 1, 2, 3]: Added an overall proposal to implement cache support using bare repo for managing third-party dependencies #423
base: main
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 10496585466Details
💛 - Coveralls |
Hi @zong-zhe I have developed a final documentation for enhancing the KPM's dependencies management. This is with reference to the rust package manager I need review and valuable feedbacks from the maintainers and members of kcl community on the design doc so that I can quickly start working on the pretests based on the discussed approach. Thanks cc: @Peefy @liangyuanpeng |
Signed-off-by: Manoramsharma <[email protected]>
Signed-off-by: Manoramsharma <[email protected]>
Signed-off-by: Manoramsharma <[email protected]>
Signed-off-by: Manoramsharma <[email protected]>
102b754
to
f217fce
Compare
|
||
- [PRETEST 2]:[Changed checkoutfrombare() by adding hash values and error handling](https://github.com/kcl-lang/kpm/pull/403) | ||
|
||
### 3.[PRETEST 3]: Research work for implementing a unified dependency support system in KPM |
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.
Here you can try to provide more details, you can refer to the visitor
The kcl package visitor - https://github.com/kcl-lang/kpm/blob/main/pkg/client/visitor.go
The visitor usage -
Line 528 in 2b1e0b9
err = NewVisitor(*pkgSource, c).Visit(pkgSource, func(kclPkg *pkg.KclPkg) error { |
visitor
does not provide caching package, it will immediately download and load the package. You can extend this visitor to support the file storage structure designed earlier with a caching mechanism.
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.
By here you mean for extending our file system to achieve a unified dependency management, right? As required in Pretest-3.
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.
Yes, you can extend this Visitor to complete the final file system,
Now the visitor
is work as:
KCL package source -> Visitor (download the remote package and load it) -> KCL Package
You can extend Visitor
to use the local file storage structure designed earlier:
KCL package source -> Visitor (download, cache and load with new local file storage structure) -> KCL Package
… path Signed-off-by: Manoramsharma <[email protected]>
Hi @Manoramsharma 😄 I just merged a PR and left a TODO for you, you can try to complete this TODO: kpm/pkg/downloader/downloader.go Line 124 in 655022e
I extended kpm/pkg/downloader/downloader.go Line 26 in 655022e
kpm/pkg/downloader/downloader.go Line 29 in 655022e
The work you need to do next now consists of two main parts:
|
``` | ||
### 1. [PRETEST 1]: Enhance git module to support bare repository clone | ||
|
||
**Completed** ✅ - [PRETEST]: [Added support for bare repo in clone function of git module](https://github.com/kcl-lang/kpm/pull/419) |
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.
Do not delete the previous content in this part, you can rewrite this part of the content to align with the PR, but do not delete.
1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):
ref #384
2. What is the scope of this PR (e.g. component or file name):
proposal/add_support_for_cache.md
3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):
Here I have proposed an overall implementation of kpm managing the third-party dependencies making the use of bare repository, serving as a cache and facilitating the downloading of package dependencies from the bare repo itself. The implementation talks about handling the file systems based on the bare repo directory . But it is not that much solid for now I need reviews form the kcl maintainers to move forward with the exact changes to achieve the discussed approach.
cc: @Peefy @zong-zhe
4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):
5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links: