-
Notifications
You must be signed in to change notification settings - Fork 47
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
sparse checkout feature - Load the package after downloading the entire repository #452
sparse checkout feature - Load the package after downloading the entire repository #452
Conversation
Signed-off-by: Asish Kumar <[email protected]>
cc @zong-zhe Could you help review it? |
By mistake i defined the package in https://github.com/kcl-lang/kcl-go/blob/1460c5ca64b0d9ef3c10d7a7b1dcc7f98991bd87/pkg/kcl/opt.go#L15 and it worked locally. I didn't realised that and pushed it. I was wondering do i have to make changes to that repo too? There is another option to pass package here https://github.com/kcl-lang/kcl-go/blob/1460c5ca64b0d9ef3c10d7a7b1dcc7f98991bd87/pkg/spec/gpyrpc/gpyrpc.pb.go#L1497 lmk which sounds good |
Hi @officialasishkumar 😄 At present, define the |
Signed-off-by: Asish Kumar <[email protected]>
Hi @zong-zhe , Thanks for the response. I have changed the code accordingly. Please have a look : ) |
Pull Request Test Coverage Report for Build 10433442117Details
💛 - Coveralls |
Signed-off-by: Asish Kumar <[email protected]>
} | ||
|
||
var modFile ModFile | ||
_, err := toml.DecodeFile(kclModPath, &modFile) |
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.
Why not use the loadpackage
function?
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.
Where is it? Can you share the link of the code or the docs?
@@ -599,3 +600,48 @@ func AbsTarPath(tarPath string) (string, error) { | |||
|
|||
return absTarPath, nil | |||
} | |||
|
|||
func FindPackage(root, targetPackage string) (string, error) { |
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.
Could you please add more documents and unit tests?
pkg/utils/utils.go
Outdated
return err | ||
} | ||
if info.IsDir() { | ||
kclModPath := filepath.Join(path, "kcl.mod") |
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.
Use the kcl.mod
constant defined in the repo.
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.
done!
cc @zong-zhe Could you help review it? @officialasishkumar I am not sure if this PR can meet all the requirements of LFX, but you should at least provide complete PR information for the functionality according to your changed code. Therefore, I only left some comments on the content of this PR. However, I believe that there is still a lot of work to be done to complete the entire topic and enable users to add Git dependent submodules using |
Additionally, the PR for this plan has been four months and it has still not been merged... cc @Zongzhe @officialasishkumar |
Signed-off-by: Asish Kumar <[email protected]>
The two most important things:
The problem I currently see is that your design doc and code do not match, and I believe you should first design the correct solution. cc @zong-zhe |
Sure thing, I have updated the title.
Since the idea was changed that is to download the entire repo, I asked in slack whether to use package command in |
I think you should update design in this PR #335 and merge it firstly. I don't think user interfaces are right in this doc. |
@Peefy
or
Will also put the package name in kcl.mod file. I will update the code accordingly. |
#453 is merged. Do we still need to keep this PR? @officialasishkumar |
No @Peefy |
1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):
2. What is the scope of this PR (e.g. component or file name):
3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):
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: