Skip to content

feat: add net.CIDR_netmask function #1921

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

Merged
merged 2 commits into from
Apr 18, 2025
Merged

Conversation

johngmyers
Copy link
Contributor

@johngmyers johngmyers commented Apr 17, 2025

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

  • N
  • Y

fixes #1857

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

kclvm/runtine/src/net

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

Adds a function to calculate the netmask of an IPv4 CIDR

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

@johngmyers johngmyers force-pushed the cidrnetmask branch 5 times, most recently from c7bd067 to 6571004 Compare April 17, 2025 19:23
@coveralls
Copy link
Collaborator

coveralls commented Apr 17, 2025

Pull Request Test Coverage Report for Build 14530872212

Details

  • 49 of 73 (67.12%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.07%) to 70.599%

Changes Missing Coverage Covered Lines Changed/Added Lines %
kclvm/runtime/src/net/mod.rs 48 72 66.67%
Files with Coverage Reduction New Missed Lines %
kclvm/sema/src/advanced_resolver/node.rs 1 84.97%
Totals Coverage Status
Change from base Build 14528394708: 0.07%
Covered Lines: 53710
Relevant Lines: 76078

💛 - Coveralls

@johngmyers johngmyers changed the title WIP: feat: add net.CIDR_netmask function feat: add net.CIDR_netmask function Apr 17, 2025
@He1pa
Copy link
Contributor

He1pa commented Apr 18, 2025

Is this PR still in draft status or has it been completed?

Signed-off-by: John Gardiner Myers <[email protected]>
Signed-off-by: John Gardiner Myers <[email protected]>
@johngmyers johngmyers marked this pull request as ready for review April 18, 2025 06:29
@johngmyers
Copy link
Contributor Author

This was blocked on #1920. Now it's merged, I rebased and marked ready for review.

I'm now putting together a documentation PR.

Copy link
Contributor

@zong-zhe zong-zhe left a comment

Choose a reason for hiding this comment

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

LGTM

@zong-zhe zong-zhe merged commit 52a5b96 into kcl-lang:main Apr 18, 2025
13 checks passed
@johngmyers johngmyers deleted the cidrnetmask branch April 18, 2025 15:09
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.

New CIDR functions not working as expected
4 participants