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

bug: extra newline in kcl.mod #426

Closed
zong-zhe opened this issue Aug 1, 2024 · 4 comments · Fixed by #427, #436 or #460
Closed

bug: extra newline in kcl.mod #426

zong-zhe opened this issue Aug 1, 2024 · 4 comments · Fixed by #427, #436 or #460
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@zong-zhe
Copy link
Contributor

zong-zhe commented Aug 1, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

When a dependency is added using kpm, an extra newline is added

image

2. What did you expect to see? (Required)

No extra newline is added.

3. What did you see instead (Required)

image

4. What is your KCL components version? (Required)

The main branch of kpm

@zong-zhe zong-zhe added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Aug 1, 2024
@zong-zhe zong-zhe added this to KCL 2025 Aug 1, 2024
@Manoramsharma
Copy link
Contributor

@zong-zhe I have raised a PR solving this issue, as there is one extra newline added in marshal function of /pkg/package/toml.go

@liangyuanpeng
Copy link
Contributor

I think it's also releate with flake tests for test cover

@Manoramsharma
Copy link
Contributor

I think it's also releate with flake tests for test cover

I think it's also releate with flake tests for test cover

Hi @liangyuanpeng I have tried to remove the extra new line in the opened PR, can ypu give more context on flake tests?

@Peefy Peefy closed this as completed in #427 Aug 6, 2024
@github-project-automation github-project-automation bot moved this to Done in KCL 2025 Aug 6, 2024
@Peefy Peefy reopened this Aug 6, 2024
@Peefy Peefy added good first issue Good for newcomers help wanted Extra attention is needed and removed good first issue Good for newcomers help wanted Extra attention is needed labels Aug 6, 2024
@Peefy
Copy link
Contributor

Peefy commented Aug 6, 2024

Hello @Manoramsharma cc @zong-zhe

Sorry, I don't think this issue has really been fixed. This PR #427 just remove extra only one blankline in the kcl.mod file.

  1. kpm init some_pkg will generate a kcl.mod file containing three blank lines instead of one.

image

  1. In the some_pkg folder, run kpm add k8s and kpm add helloworld will generate a kcl.mod file containing two blank lines instead of one.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
Status: Done
4 participants