Skip to content

Conversation

@Arpit529Srivastava
Copy link
Contributor

@Arpit529Srivastava Arpit529Srivastava commented Jan 4, 2026

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

  • N
  • Y

fix: #296

2. What is the scope of this PR (e.g. component or file name):

  • pkg/fs/util.go
  • pkg/options/import.go
  • cmd/kcl/commands/import.go

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

Allows kcl import to accept HTTP/HTTPS URLs as input, enabling direct import from remote sources without manual download.
eg:

kcl import -m json https://api.github.com/meta

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
# Test URL import
kcl import -m json https://api.github.com/meta -o test.k

# Verify local files still work
kcl import data.json

Signed-off-by: arpit529srivastava <arpitsrivastava529@gmail.com>
@Arpit529Srivastava
Copy link
Contributor Author

/cc @Peefy PTAL
Thank you

@coveralls
Copy link

Pull Request Test Coverage Report for Build 20691291062

Details

  • 0 of 62 (0.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-2.0%) to 27.386%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/options/import.go 0 24 0.0%
pkg/fs/util.go 0 38 0.0%
Totals Coverage Status
Change from base Build 20614186533: -2.0%
Covered Lines: 241
Relevant Lines: 880

💛 - Coveralls

@Peefy Peefy merged commit 3a679ab into kcl-lang:main Jan 4, 2026
10 checks passed
@Arpit529Srivastava Arpit529Srivastava deleted the feat-issue-296 branch January 4, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow URLs for kcl import paths

3 participants