Skip to content

refactor: lib artifact and error message #102

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 1 commit into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .github/workflows/dotnet-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ jobs:
defaults:
run:
working-directory: "dotnet"
env:
DevBuild: 'false'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -61,11 +59,6 @@ jobs:
run: cargo build --release
- name: Clear package cache
run: dotnet clean KclLib.sln && dotnet nuget locals all --clear
- name: Enable development builds for the main branch
if: github.ref == 'refs/heads/main' || github.base_ref == 'main'
shell: bash
run: |
echo "DevBuild=true" >> $GITHUB_ENV
- name: Restore packages
run: dotnet restore KclLib.sln
- name: Build
Expand Down
23 changes: 23 additions & 0 deletions dotnet/KclLib/KclLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,36 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PackageReadmeFile>README.md</PackageReadmeFile>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<PropertyGroup>
<AssemblyName>KclLib</AssemblyName>
<PackageId>KclLib</PackageId>
<Version>0.9.0</Version>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<RepositoryUrl>https://github.com/kcl-lang</RepositoryUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<Title>KclLib</Title>
<PackageDescription>
KCL Artifact Library for .NET
</PackageDescription>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<EnablePackageValidation>true</EnablePackageValidation>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.27.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
<None Include="../target/release/libkcl_lib_dotnet.*">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Expand Down
13 changes: 13 additions & 0 deletions dotnet/KclLib/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# KCL Artifact Library for .NET

This library is currently under development. Please check back later.

## Developing and Testing

- Install `cargo`
- Install `dotnet 8.0+`

```shell
cargo build --release
dotnet test
```
2 changes: 1 addition & 1 deletion python/kcl_lib/api/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def call(self, name: str, args):
)
)
if result.startswith(b"ERROR"):
raise Exception(str(result))
raise Exception(result.decode(encoding="uft-8"))
msg = self.create_method_resp_message(name)
msg.ParseFromString(result)
return msg
Expand Down
Binary file modified wasm/kcl.wasm
Binary file not shown.
Loading