Skip to content

Commit

Permalink
重新发布
Browse files Browse the repository at this point in the history
  • Loading branch information
NMSAzulX committed Nov 13, 2024
1 parent 5e197a1 commit 4dbe34e
Show file tree
Hide file tree
Showing 10 changed files with 141 additions and 21 deletions.
10 changes: 10 additions & 0 deletions .github/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,16 @@ src:
project_folder: src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor.SG
labels:
dependency_config:
- using_output:
id: 8B5F2626-8EB0-44FF-9F1F-A1EFBCF8E030
is_ignored: false
is_folded: false
relative_path: src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor.Wrapper/Natasha.CSharp.HotExecutor.Wrapper.csproj
project_name: Natasha.CSharp.HotExecutor.Wrapper
package_name: DotNetCore.Natasha.CSharp.HotExecutor.Wrapper
project_folder: src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor.Wrapper
labels:
dependency_config:
test:
folded_projects: []
global_labels:
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,45 @@ jobs:
- name: 📶 Push to Nuget
if: ${{ needs.prepare_check.outputs.hasNugetKey == 'true' }}
run: dotnet nuget push *.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate

release:

runs-on: ubuntu-latest
needs: prepare_check
env:
RELEASE_VERSION: ${{needs.prepare_check.outputs.releaseVersion}}
PACK_STRING: ${{needs.prepare_check.outputs.releasePackString}}

steps:
- uses: actions/checkout@v4
- name: 🎉 Release
run: |
RELEASE_ID=$(gh api graphql -H "X-Github-Next-Global-ID: 1" -f query='
query{
repository(owner:"${{github.repository_owner}}",name:"${{github.event.repository.name}}"){
release(tagName:"v${{env.RELEASE_VERSION}}"){
id
}
}
}' --jq '.data.repository.release.id')
RESULT=0
if [ "$RELEASE_ID" != "" ]; then
if [ "$RELEASE_ID" != "null" ]; then
RESULT=1
fi
fi
if [ $RESULT == 0 ]; then
echo "::debug::no release package"
echo "不存在 Id ,开始创建 Release v${{env.RELEASE_VERSION}} 包!"
gh release create v${{env.RELEASE_VERSION}} -F CHANGELOG.md
else
echo "::debug::exist release package"
echo "该 Release v${{env.RELEASE_VERSION}} 包已存在!"
gh release edit v${{env.RELEASE_VERSION}} --notes-file CHANGELOG.md
fi
47 changes: 43 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,57 @@ Example:
-->

## [9.0.0.0] - 2024-11-13
## [9.0.0.1] - 2024-11-13

### DotNetCore.Natasha.CSharp.HotExecutor _ v9.0.0.0:
### DotNetCore.Natasha.CSharp.HotExecutor _ v9.0.0.1:
- 基于 Natasha 的热执行,允许程序在运行时更改代码,并输出新的结果.
- 跟随其他扩展库版本号发布.

### DotNetCore.Natasha.CSharp.HotExecutor.SG _ v9.0.0.0:
### DotNetCore.Natasha.CSharp.HotExecutor.SG _ v9.0.0.1:
- 热执行的 SG 扩展库.
- 跟随其他扩展库版本号发布.

### DotNetCore.Natasha.CSharp.HotExecutor.Wrapper _ v8.9.0.0:
### DotNetCore.Natasha.CSharp.HotExecutor.Wrapper _ v9.0.0.1:
- 热执行 + SG 封装库.
- 跟随其他扩展库版本号发布.


### DotNetCore.Natasha.CSharp.Compiler _ v9.0.0.1:
- 增加私有操作系列 API.
- 升级 Roslyn 依赖.
- 优化异常报告,增加 GetException API 以便在编译周期外获取异常.
- 增加复用系列 API.
- 增加重复编译时文件命名策略.
- 优化 API 注释.
- "Domain" 系列 API 重命名为 "LoadContext".
- 优化 编译级别 API, 使用编译级别是更容易看懂.
- 增加链式初始化器.

### DotNetCore.Natasha.CSharp.Template.Core _ v9.0.0.1:
- 跟随 Compiler 升级依赖.

### DotNetCore.Natasha.CSharp.Extension.Codecov _ v9.0.0.1:
- 跟随 Compiler 升级依赖.

### DotNetCore.Natasha.CSharp.Extension.Ambiguity _ v9.0.0.1:
- 跟随 Compiler 升级依赖.

### DotNetCore.Natasha.CSharp.Extension.MethodCreator _ v9.0.0.1:
- 发布 便捷动态方法编译模板.
- 跟随其他扩展库版本号发布.

### DotNetCore.Natasha.CSharp.Extension.CompileDirector _ v9.0.0.1:
- 编译导演,每次编译学习并保留有用的 using code.
- 跟随其他扩展库版本号发布.

### DotNetCore.Natasha.CSharp.Compiler.Domain _ v9.0.0.1:
- 跟随其他扩展库版本号发布.

### DotNetCore.Natasha.Domain _ v9.0.0.1:
- 跟随其他扩展库版本号发布.

### DotNetCore.Natasha.DynamicLoad.Base _ v9.0.0.1:
- 跟随其他扩展库版本号发布.



33 changes: 33 additions & 0 deletions samples/ExtensionSample/Class7.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

//#if DEBUG
using System.IO;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using Natasha.CSharp.HotExecutor.Component;
using Natasha.CSharp.Extension.HotExecutor;
using ExtensionSample;
namespace System
{


class InterceptMain1
{

[ModuleInitializer]
internal static void PreMain()
{

HEProxy.SetProjectKind(HEProjectKind.Console);
HEProxy.SetCompileInitAction(() => {

NatashaManagement.RegistDomainCreator<NatashaDomainCreator>();
NatashaManagement.Preheating((asmName, @namespace) => !string.IsNullOrWhiteSpace(@namespace) && (@namespace.StartsWith("Microsoft.VisualBasic") || HEProxy.IsExcluded(@namespace)), true, true);

});
HEProxy.Run();

}

}
}
//#endif
12 changes: 6 additions & 6 deletions samples/ExtensionSample/ExtensionSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<TargetFramework>net8.0</TargetFramework>
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<!--<ImplicitUsings>enable</ImplicitUsings>-->
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

Expand All @@ -14,14 +14,14 @@
<Compile Remove="InteroAttribute.cs" />
</ItemGroup>

<ItemGroup>
<!--<ItemGroup>
<PackageReference Include="DotNetCore.Natasha.CSharp.HotExecutor.Wrapper" Version="8.9.0" />
</ItemGroup>-->

<ItemGroup>
<ProjectReference Include="..\..\src\Natasha.CSharp\Component\Core\Natasha.CSharp.Compiler.Domain\Natasha.CSharp.Compiler.Domain.csproj" />
<ProjectReference Include="..\..\src\Natasha.CSharp\Extension\HotExecutor\Natasha.CSharp.HotExecutor.SG\Natasha.CSharp.HotExecutor.SG.csproj" />

<ProjectReference Include="..\..\src\Natasha.CSharp\Extension\HotExecutor\Natasha.CSharp.HotExecutor\Natasha.CSharp.HotExecutor.csproj" />

<ProjectReference Include="..\..\src\Natasha.CSharp\Extension\Natasha.CSharp.Extension.CompileDirector\Natasha.CSharp.Extension.CompileDirector.csproj" />
<ProjectReference Include="..\..\src\Natasha.CSharp\Extension\Natasha.CSharp.Extension.MethodCreator\Natasha.CSharp.Extension.MethodCreator.csproj" />
</ItemGroup>

</Project>
6 changes: 2 additions & 4 deletions samples/ExtensionSample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ static void Main(string[] args)
//{
// Console.WriteLine("无法获取父进程信息。错误代码: " + status);
//}


HEProxyState<int>.Value += 1;
for (int i = 0; i < args.Length; i++)
{
Expand Down Expand Up @@ -160,7 +158,7 @@ public static void ProxyMainArguments()
HEProxy.AppendArgs("参数3");
HEProxy.AppendArgs("参数4");
}

/*
private static void RunAssemblyBuilder(CompileDirector director)
{
var builder = director.CreateBuilder();
Expand All @@ -176,7 +174,7 @@ public static void Show()
asm.GetDelegateFromShortName<Action>("A", "Show")!();
}
/*
public static async void TestPage()
{
GithubQueryData query = new()
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<SignAssembly>true</SignAssembly>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<Company>.NET Core Community</Company>
<Authors>NMSAzulx</Authors>
<Authors>NMSAzulx;LanX;ncc;</Authors>
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
</ItemGroup>

<ItemGroup>
<None Include="Targets\Project.Usings.targets" Pack="true" PackagePath="build\netstandard2.1\DotNetCore.Natasha.CSharp.Extension.HotReload.targets" />
<None Include="Targets\Project.Usings.targets" Pack="true" PackagePath="buildTransitive\netstandard2.1\DotNetCore.Natasha.CSharp.Extension.HotReload.targets" />
<None Include="Targets\Project.Usings.targets" Pack="true" PackagePath="buildMultiTargeting\netstandard2.1\DotNetCore.Natasha.CSharp.Extension.HotReload.targets" />
<None Include="Targets\Project.Usings.targets" Pack="true" PackagePath="build\netstandard2.1\DotNetCore.Natasha.CSharp.HotExecutor.targets" />
<None Include="Targets\Project.Usings.targets" Pack="true" PackagePath="buildTransitive\netstandard2.1\DotNetCore.Natasha.CSharp.HotExecutor.targets" />
<None Include="Targets\Project.Usings.targets" Pack="true" PackagePath="buildMultiTargeting\netstandard2.1\DotNetCore.Natasha.CSharp.HotExecutor.targets" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
<Using Include="Natasha.CSharp" />
<Using Include="Natasha.CSharp.Reverser" />
<Using Include="Natasha.CSharp.Compiler.Utils" />
<Using Include="System.Runtime.CompilerServices
//" />
<Using Include="Natasha.CSharp.Compiler.Component" />
<Using Include="Natasha.CSharp.Compiler" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion test/workflow/Workflow.Initialization/Core/ConfigRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ internal static void GenUsings(SolutionConfiguration solutionInfo)
}
var collection = SolutionInfo.GetCSProjectsByStartFolder("src");
var projectMapper = collection.Projects.ToDictionary(item => item.Id, item => item);
Regex usingReg = new Regex("namespace (?<using>.*?)[;{].*?public[^\\r\\n]*?(class|struct|enum|interface|record).*?{", RegexOptions.Singleline | RegexOptions.Compiled);
Regex usingReg = new Regex("namespace (?<using>.*?)[ ;{\\r\\n].*?public[^\\r\\n]*?(class|struct|enum|interface|record).*?{", RegexOptions.Singleline | RegexOptions.Compiled);
Regex buildReg = new Regex("<ItemGroup>[\\s]*?<None Include=\"Targets\\\\Project.Usings.targets\".*?</ItemGroup>", RegexOptions.Singleline | RegexOptions.Compiled);

foreach (var project in solutionInfo.Src.Projects)
Expand Down

0 comments on commit 4dbe34e

Please sign in to comment.