Skip to content
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

refactor: refactor load package #488

Merged
merged 2 commits into from
Sep 20, 2024
Merged

refactor: refactor load package #488

merged 2 commits into from
Sep 20, 2024

Conversation

zong-zhe
Copy link
Contributor

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

  • N
  • Y

re #478

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):

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Other

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

  • N
  • Y

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

  • Unit test
  • Integration test
  • Benchmark (add benchmark stats below)
  • Manual test (add detailed scripts or steps below)
  • Other

@zong-zhe zong-zhe added the enhancement New feature or request label Sep 20, 2024
@zong-zhe zong-zhe requested a review from Peefy September 20, 2024 09:42
@zong-zhe zong-zhe self-assigned this Sep 20, 2024
@coveralls
Copy link

coveralls commented Sep 20, 2024

Pull Request Test Coverage Report for Build 10957207940

Details

  • 108 of 167 (64.67%) changed or added relevant lines in 5 files are covered.
  • 55 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.5%) to 41.674%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/downloader/source.go 0 3 0.0%
pkg/package/package.go 85 141 60.28%
Files with Coverage Reduction New Missed Lines %
pkg/package/modfile.go 18 35.8%
pkg/client/client.go 37 56.73%
Totals Coverage Status
Change from base Build 10955213375: -0.5%
Covered Lines: 3446
Relevant Lines: 8269

💛 - Coveralls

Copy link
Contributor

@Peefy Peefy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

// Load the kcl.mod file, and make sure the `ModFile` is the same as the content in the kcl.mod file.
// For the dependency like "helloworld=0.1.0", `ModFile` will lack the source information.
// The `ModFile` will be filled with the source information loaded by `LoadAndFillModFileWithOpts`
func (mod *ModFile) LoadModFile(modfilepath string) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change filepath to modfilepath?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Signed-off-by: zongzhe <[email protected]>
@zong-zhe zong-zhe merged commit 94b8b96 into main Sep 20, 2024
6 checks passed
@zong-zhe zong-zhe deleted the refactor-pkg-load branch October 15, 2024 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Enhancement: kpm add command displaying optimization
3 participants