-
Notifications
You must be signed in to change notification settings - Fork 36
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
Will upgrade basis environments. #100
Comments
Other topic (only listed)
|
NOTE: Add platform targets applying only IL2C bulding time, NOT IL2C runtimes. |
Azure DevOps Pipelines will break. |
ILSupport couldn't execute on posix environment, because it depends native tooling |
Another solution: InlineIL.Fody
|
Migration code fragment is here. |
Hey @kekyo, since this project is very new (v0.4), is keeping netfx build and test support important for this project? Most new projects are targeting .NET 5. In case it is not important for this project, it is possible to use |
@am11 Thank you, your opinion is right. I agreed MVP requirement has to make smaller, but I think:
I didn't know SDK directive I expected the IL2C regression test to have to write a lot. Therefore, I had to think of a way to put the C# and IL code as close as possible and maintain it easily. The current method wasn't the best, but I think it was a good first idea. (It seems that it is not well known... NUnit is already multi-platform compatible without any problems. Conversely, when I evaluated xUnit (on another my own project) about a year ago, I didn't make the transition because the parallel testing (on multi core system) wasn't very fast.) |
The IL SDK imports the .NET SDK, so it is possible to compile C#, VB, F# and IL sources with a single project file, but it has some caveats which would require us to make a custom msbuild target to override stuff. e.g. if C# file has the executable entrypoint and IL has just library methods; ilproj will have The cleanest way (to avoid any workarounds) is to use .ilproj for IL files and .csproj for C# files, and then one could be library project (default OutputType), and other could be Exe referencing each other via the regular While preparing this answer, I just found a small issue on Alpine Linux (which has a workaround), which is now being fixed by dotnet/runtime#60400. IL SDK comes right from the runtime where il{d}asm source code lives, so I recommend using that because of its primitivity. 😅 You may also find structure of ilverify tests, interesting: https://github.com/dotnet/runtime/tree/cf49643711ad8aa4685a8054286c1348cef6e1d8/src/tests/ilverify/ILTests (probably not the exact thing we need here, but something to make inference from). |
Topic on IL SDK: I checked IL SDK NuGet package and got another solution. It contains referrer of ILAsm/ILDasm .NET 5.0 based binaries splitted several public distributed NuGet sub packages. That means can continue using the ILSupport with these sub packages. I'm thinking about which method to use. I feel that maintaining IL Support is not very good, but I feel that this method has the advantage of minimizing changes.... |
Memoized ILAsm native binary naming rules:
|
Memoized ILVerify package: https://www.nuget.org/packages/dotnet-ilverify/5.0.0 |
Problem: Rider (on ubuntu 20.04) couldn't find dynamic generated testcases on unit test explorer. (Building is succeeded on ubuntu 20.04 except IL2C.Runtime (VC++) project). |
GitHub Actions partially enabled.
|
9eb5965 Windows CI with test is recovered. |
MEMO: I found it. NUnit 3 custom attributes are dynamic test case generator interface, cool. Currently Rider on linux doesn't show up any test case in the test explorer. I feel it problem reason comes from using internal knowledge of NUnit. It is found on NUnit version 2 and it didn't have these interfaces... |
I implemented (and WIP) ILCompose.
|
I found a slightly older (but public), extended interface for NUnit. It may be possible to run native code after a managed test run without affecting NUnit's
If the second method works, it may ease the transition of the test code by mimicking IL2C's own |
The following codes were tried with good results. using NUnit.Framework;
using NUnit.Framework.Interfaces;
namespace ClassLibrary1
{
public sealed class CustomTestCaseAttribute : TestCaseAttribute, ITestAction
{
public CustomTestCaseAttribute(object? expected, params object?[] args) :
base(args) =>
this.ExpectedResult = expected;
public ActionTargets Targets => ActionTargets.Default;
public void BeforeTest(ITest test)
{
}
public void AfterTest(ITest test)
{
//throw new Exception("AAA");
}
}
public class Class1
{
[CustomTestCase(3, 1, 2)]
public int Test1(int a, int b)
{
return a + b;
}
}
} <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="NUnit" Version="3.13.2" />
<packagereference Include="NUnit3TestAdapter" Version="3.17.0" PrivateAssets="All" />
</ItemGroup>
</Project> |
#119 merged, but there are still a few remaining cases.
We found that we needed to address the native binary generation and referencing issues in the library references ( |
Motivate
I already switched main computing platform from Windows to Linux (Ubuntu).
So need to build on Ubuntu and pure .NET 5.0 SDK (and use Rider).
The text was updated successfully, but these errors were encountered: