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

feat: support json rpc server #484

Merged
merged 2 commits into from
Apr 6, 2023
Merged

Conversation

NeverRaR
Copy link
Contributor

@NeverRaR NeverRaR commented Apr 4, 2023

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

  • N
  • Y

re: #425

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

KCLVM/kclvm/api
KCLVM/kclvm/capi
KCLVM/kclvm/cmd
KCLVM/kclvm/lib.rs

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

refactor: use prost to generate protobuf model for better customization capability and GRPC adaptation
feat: support json rpc server

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

kclvm/api/src/capi_test.rs is used to test capi with model generated by prost

6. Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@NeverRaR NeverRaR requested a review from Peefy April 4, 2023 09:49
@Peefy Peefy added api Issues or PRs related to kcl rust native APIs and multi-lang APIs release labels Apr 4, 2023
@Peefy Peefy added this to the v0.4.6 Release milestone Apr 4, 2023
@coveralls
Copy link
Collaborator

coveralls commented Apr 4, 2023

Pull Request Test Coverage Report for Build 4625397237

  • 575 of 971 (59.22%) changed or added relevant lines in 16 files are covered.
  • 31 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-21.8%) to 66.213%

Changes Missing Coverage Covered Lines Changed/Added Lines %
kclvm/api/src/service/into.rs 21 22 95.45%
kclvm/api/src/service/service_impl.rs 19 22 86.36%
kclvm/api/src/capi_test.rs 105 109 96.33%
kclvm/cmd/src/lib.rs 0 4 0.0%
kclvm/api/src/service/ty.rs 2 8 25.0%
kclvm/api/src/service/capi.rs 23 30 76.67%
kclvm/api/src/service/util.rs 5 14 35.71%
kclvm/third-party/prost-wkt/src/lib.rs 20 29 68.97%
kclvm/third-party/prost-wkt/wkt-types/src/pbtime.rs 73 84 86.9%
kclvm/third-party/prost-wkt/wkt-types/src/pbany.rs 87 153 56.86%
Files with Coverage Reduction New Missed Lines %
compiler_base/session/src/lib.rs 31 45.16%
Totals Coverage Status
Change from base Build 4625229960: -21.8%
Covered Lines: 26711
Relevant Lines: 40341

💛 - Coveralls

kclvm/api/src/service/capi.rs Outdated Show resolved Hide resolved
kclvm/api/src/service/capi.rs Show resolved Hide resolved
kclvm/api/src/service/capi.rs Outdated Show resolved Hide resolved
kclvm/api/Cargo.toml Outdated Show resolved Hide resolved
kclvm/api/src/service/service_impl.rs Outdated Show resolved Hide resolved
@NeverRaR NeverRaR force-pushed the dev/boying/server branch 3 times, most recently from f453c86 to 9b57b0d Compare April 6, 2023 04:03
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

@Peefy Peefy merged commit bf66927 into kcl-lang:main Apr 6, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api Issues or PRs related to kcl rust native APIs and multi-lang APIs release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants