-
Notifications
You must be signed in to change notification settings - Fork 49
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 - kcl mod add --package #453
Sparse checkout - kcl mod add --package #453
Conversation
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
This PR is different from the last one since here I am using the package functionality in add subcommand. I have written a description which explains more about this PR. I hope it helps! Also, Please let me know if there are any other tasks that I am missing out on the description that needs to be done.
|
Pull Request Test Coverage Report for Build 10465292101Details
💛 - Coveralls |
Hi @officialasishkumar 😄 There is a null pointer exception in the e2e test, you may need to check these test cases and fix the null pointer. |
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Hi @zong-zhe , Thank you for the comment. Will fix it soon! |
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
699f3eb
to
56b3ff8
Compare
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
@zong-zhe fixed the failing tests |
cc @Zongzhe |
pkg/client/client.go
Outdated
@@ -52,6 +52,8 @@ type KpmClient struct { | |||
settings settings.Settings | |||
// The flag of whether to check the checksum of the package and update kcl.mod.lock. | |||
noSumCheck bool | |||
// The package to use in case of multiple packages. | |||
pkg string |
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.
It may not be appropriate to add this field to KpmClient, which is the client of the package management tool, and it should not be associated with a specific package.
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.
Thanks for the comment @zong-zhe. I have removed it!
Hi @officialasishkumar 😄 Good job. The overall direction of your work is correct, and most of it has been completed. Now, there are still a few problems. In addition to the comments I gave you in the code, you also need to add some test cases for the functions you developed to ensure that your functions are normal. It mainly includes: 1. To test whether kcl.mod with |
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
6842206
to
64621be
Compare
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Hey @zong-zhe, I have addressed the comments. Please have a look! |
Hi @officialasishkumar 😄 Add a test case to test the dependency is added as expected to kcl.mod and kcl.mod.lock, prepare the expected.mod and expected.mod.lock, empty kcl.mod and kcl.mod.lock, after adding the dependency, compare the kcl.mod/kcl.mod.lock with expected.mod/expected.mod.lock. |
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
37a11e7
to
fee67ab
Compare
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Hi @zong-zhe i have added the mentioned test case |
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.
Good Job! LGTM
@Peefy Are there any other deliverables left for LFX? |
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):
This PR adds a functionality that allows to add a single package in the dependency incase the repo contains multiple of them. It does this as follows:
kcl mod add --git <url> --commit <hash> --package <package_name>
(done)After running this command, KPM will download the whole repo (also works if there is no kcl.mod in the root) and specifies package in the kcl.mod file. It changes the full_name, name and other similar variables in kcl.mod.lock and kcl.mod as per the package name (it doesn't uses the repo name if package flag is there).
kcl mod run
(done)This command will first checkout the directory which contains the package by running a recursive function. It will then do all the usual kcl compilation based on that directory.
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: