Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 22:23
  • Jan 31 2019 22:00
    MichalStrehovsky commented #6919
  • Jan 31 2019 21:59
    MichalStrehovsky opened #6928
  • Jan 31 2019 20:45
  • Jan 31 2019 19:57
    kouvel commented #6880
  • Jan 31 2019 19:45
    filipnavara commented #6880
  • Jan 31 2019 19:44

    jkotas on master

    Merge pull request #6815 from d… Merge pull request #6839 from d… Merge pull request #6859 from d… and 8 more (compare)

  • Jan 31 2019 19:44
    jkotas closed #6926
  • Jan 31 2019 19:43
    kouvel commented #6880
  • Jan 31 2019 19:26
    kouvel commented #6880
  • Jan 31 2019 19:19

    trylek on master

    Pointer size and ARM64 fixes in… (compare)

  • Jan 31 2019 19:19
    trylek closed #6921
  • Jan 31 2019 18:40
    jkotas synchronize #6926
  • Jan 31 2019 18:40

    jkotas on nmirror

    MethodOnStruct - Fixing Project… Merge pull request #6927 from d… (compare)

  • Jan 31 2019 18:40
    jkotas closed #6927
  • Jan 31 2019 18:32
    dotnet-bot opened #6927
  • Jan 31 2019 17:19

    jkotas on master

    Reverting "Fixing up the UTF8Fo… Add managed implementation of G… (compare)

  • Jan 31 2019 17:19
    jkotas closed #6923
  • Jan 31 2019 17:18

    jkotas on master

    Fix ProjectN build breaks (#692… (compare)

  • Jan 31 2019 17:18
    jkotas closed #6924
Robin Sue
@Suchiman
@yowl from reading ECMA-335, it sounds like, that if my target type is native unsigned int, i would use conv.u to convert to native unsigned int
yowl
@yowl
That's what I'm wondering about as well, there is a signedness to both the source and the destination, but there is only one signedness in the opcode
Robin Sue
@Suchiman
and weirdly enough both say that they push native int onto the stack...
is the signedness not inherent to the type but the operations applied to it for native int?
yowl
@yowl
Yes, that's a bit odd, if you then go to a long...
yowl
@yowl
NativeAOT-LLVM is miles behind main. :-( Grabbing main, and copying the LLVM stuff back in might be easier than trying to fix all the merge conflicts. Would loose the history though I suppose
I think the last merge was December 2020
yowl
@yowl
When did NativeAOT get merged to runtime and all merges from runtime->runtimelab stopped?
yowl
@yowl
Merging seems to have become hard. Maybe I'm just doing it wrong, but there seems to be no base for NativeAOT-LLVM and what was master(now main) and hence the merge is a really hard:
image.png
yowl
@yowl
looks like that was just git extensions not configuring kdiff correctly, there is a base found, and having found it the number of conflicts drops to 0 :-)
timiil
@timiil
dotnet publish xxx.sln -r linux-arm64 -c Release -p:CppCompilerAndLinker=clang-9 -p:SysRoot=/crossrootfs/arm64
the above command is OK to cross build my project into arm64 native AOT, but with a very large memory usage
one Centos 8 with 16GB memroy is failed to build , but a 32GB memory one is GOOD.
so, my question here is , do we have some MAGIC switch that let build command to use a SMALL memory usage , because many Cloud VPS did not have some large memory!
timiil
@timiil
one more, if we give the OS a swap file 4GB, the build command is also OK in 16GB memory machine, BUT, many Cloud Build machine DO NOT give us the permission to assigned the Swap file :(
Andrii Kurdiumov
@kant2002:matrix.org
[m]
That’s objwriter eating up memory most likely.
I believe there nothing you can do. At best you can hope that dotnet/runtime#77178 materialize
Maybe you can try Filips branch
timiil
@timiil
objwriter is some class written in C# ? or a C++ component that for the AOT native building ?
1 reply
timiil
@timiil
this will let us hard to clound CI/CD :(
timiil
@timiil
@kant2002:matrix.org FYI,for the hungry memory usage for the ObjWriter, i should have a 'half' method : use the SWAP drive in our linux system. i had try on some 16GB system to success build the project, which will failed without SWAP assigment.
but this method is not good enough, because many cloud VM | docker builder may NOT let us assige the SWAP drive :(
timiil
@timiil
any one know that why the ASP.NET 6 application is failed by complie to corert now ?
'''
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
app.MapGet("/test", () => "ok");
app.Run();
'''
3 replies
ILC: Method '[Microsoft.AspNetCore.Server.Kestrel.Transport.Quic]Microsoft.AspNetCore.Hosting.WebHostBuilderQuicExtensions.UseQuic(IWebHostBuilder)' will always throw because: Failed to load type 'System.Net.Quic.Implementations.QuicImplementationProvider' from assembly 'System.Net.Quic, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
Optimizing assemblies for size, which may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
src -> /src/bin/Release/net6.0/linux-arm64/publish/
timiil
@timiil
hi , come in again
public record Product(int A, string B, int C);

...
var type = typeof(Product);
var ctors = type.GetConstructors();        //In normal dotnet 6/7 rutime, it returns [1], 
                            //In dotnet 6 native aot rutime, it return [1]
                            //In dotnet native aot rutime, it return [0]
4 replies
Andrii Kurdiumov
@kant2002:matrix.org
[m]
Or if you add Activator.CreateInstance(type) I think you will see desired behavior
timiil
@timiil
the problem is , .NET 7 need to 'warmup' way to load the constructors or properties on the application startup, if you want to use them on reflection
2 replies
timiil
@timiil
Gtk has failed again , in .NET 7, native AOT mode...
public record Product(int A, string B, int C);

...
var type = typeof(Product);
var ctors = type.GetConstructors();        //In normal dotnet 6/7 rutime, it returns [1], 
                            //In dotnet 6 native aot rutime, it return [1]
                            //In dotnet native aot rutime, it return [0]

.\test.csproj:

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
    <PublishAot>true</PublishAot>
</PropertyGroup>


  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net7.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

<ItemGroup>
    <PackageReference Include="GtkSharp" Version="3.24.24.34" />
  </ItemGroup>

<ItemGroup>


                <RdXmlFile Include="rd.xml" />
        </ItemGroup>

</Project>

rd.xml:

<Directives>
        <Application>
                <Assembly Name="GLibSharp">
                        <Type Name="GLib.Object" MarshalStructure="Required All" />
                        <Type Name="GLib.Object+GObject_g_type_instanceAlign" MarshalStructure="Required All" />
                        <Type Name="GLib.Object+GObject_ref_countAlign" MarshalStructure="Required All" />
                        <Type Name="GLib.Object+GObject_qdataAlign" MarshalStructure="Required All" />

                </Assembly>

                <Assembly Name="GtkSharp">
                        <Type Name="Gtk.Window" MarshalStructure="Required All" />
                </Assembly>

        </Application>
</Directives>

Lib.cs

namespace LibA;

public class WinA : Gtk.Window
{

        public WinA():base("")
          {

          }

}

Program.cs:

using Gtk;

Application.Init();
using  LibA.WinA win = new ();

Console.WriteLine("done");

normal CLR running is OK,
native AOT x64 mode is:

dotnet publish -r win-x64 -c Release -p AOT=true
D:\code\test\test\bin\Release\net7.0\win-x64\publish\test.exe

failed here:

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at GLib.GType.op_Explicit(Type) + 0x1a2
   at GLib.Value..ctor(Object) + 0x2b
   at Gtk.Window..ctor(WindowType) + 0xdc
   at Program.<Main>$(String[]) + 0x29
   at test!<BaseAddress>+0x222a4b
Andrii Kurdiumov
@kant2002:matrix.org
[m]
Did you debug why GtkSharp is failing? Can you launch you test.Exe within Visual Studio and check what’s Type is missing?
Andrii Kurdiumov
@kant2002
Also, if you want help, I would be appreciate some github repo, that way when I have even 5 minutes of time, I can quickly git clone and dotnet publish and find an issue.
timiil
@timiil
ok , i had post to github issue
i try to upload the code to a repo
@kant2002 i had upload my code
Andrii Kurdiumov
@kant2002
image.png
@timiil all I can say for now, is that this piece of conversion to Gtk.Object causes NNRE
Probably something should be rooted.
timiil
@timiil
图片.png
in dotnet 6, is good here
if we just new the Gtk.Window, var win = new Gtk.Window(string.Empty); this is OK ,no fault
timiil
@timiil
only failed if Inherit a class
timiil
@timiil
图片.png
Andrii Kurdiumov
@kant2002
Can you add <IlcGenerateCompleteTypeMetadata>true</IlcGenerateCompleteTypeMetadata>
that would work too.
The problem with how GtkSharp generates code. It rely on reflection seems to be even more then I can imagine
timiil
@timiil
thanks you and him :)
yowl
@yowl
in the runtime repo, does it still support running just the nativeaot smoke tests? I'm trying to merge NativeAOT-LLVM forward and can't understand how the running of tests has changed and what i need to do to stop wasm building anything except the smoke tests
12 replies