Closed karashiiro closed 11 months ago
Huh, this may be an issue with other versions of ilasm.
I am using mono ilasm 6.12, so there could be some differences in terms of syntax / command arguments.
Could you provide vec.il
so that I could try and assemble it with my version of ilasm?
I have tried the .NET Core version of ilasm and it has this issue. So this stems from differences in syntax accepted by different "flavors" of ilasm.
The name flags
seems to be reserved in newer versions of ilasm
. I will add it to the list of field names to escape.
Syntax errors should be fixed in eb7a183. I am still working on the issue with arguments. There seems to be a difference in the way mono ilasm and .NET core ilasm parse arguments.
The file, for reference even though it looks like this is being dealt with without it: vec.il.txt
(renamed to vec.il.txt
so GH accepts it). Ignore the extra valuetype
keywords, I was messing with that since ilasm
didn't like RustVoid*
either. No other local changes besides that, but this issue was happening even before I made any changes.
The specific ilasm
I was using just comes from Nuget, ripped straight from the CDN: https://globalcdn.nuget.org/packages/runtime.linux-x64.microsoft.netcore.ildasm.7.0.0.nupkg (unzip
can handle nupkgs just fine).
Actually that's the ildasm package, ilasm is just https://globalcdn.nuget.org/packages/runtime.linux-x64.microsoft.netcore.ilasm.7.0.0.nupkg though
You were on the right track - RustVoid
was the cause of one of the issues. The function prefixed_type_cli
is supposed to add valuetype
prefix to all types that require it, but RustVoid
was accidentally left out.
The bug involving invalid arguments for ilasm should also now be fixed in 684e8cbbc82cc84e1466f3ce75a9c1c6eb1cba1e.
If everything is working correctly, all tests besides
compile_test::main
compile_test::nbody
compile_test::vec
should run, with main
and nbody
not compiling, and vec
compiling with warnings about unwinding/drops.
If you have any more issues or any questions about the codebase, feel free to ask. Function documentation is very lacking right now.
It's looking much better, but about half of the tests are still failing on my end: cargo_test.log
I think this is a simpler issue, dotnet --info
is producing different output than what the test is expecting, so it's dumping a multiline string and causing the JSON parser to fail.
An example (add.runtimeconfig.json
):
{
"runtimeOptions": {
"tfm": "netcoreapp3.1",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "7.0.401
Commit: eb26aacfec
Runtime Environment:
OS Name: debian
OS Version: 11
OS Platform: Linux
RID: debian.11-x64
Base Path: /usr/share/dotnet/sdk/7.0.401/
Host:
Version: 7.0.11"
},
"configProperties": {
"System.Threading.ThreadPool.MinThreads": 4,
"System.Threading.ThreadPool.MaxThreads": 25
}
}
}
After fixing that, I get the same test results as you, so I think this can be closed after #7 is merged.
Hello, I was getting this set up locally to see if I could help with anything, but I haven't been able to get any of the existing tests to pass the
ilasm
step duringcargo test
. Is this expected, and if so, what's the process for checking if things work?Once the IL is built, running
ilasm
manually produces syntax errors (not sure why the options are being parsed wrong but setting that aside for now; runningilasm /dll /output:vec.dll vec.il
produces the same output even though that should be exactly what the test does):env info
nightly-2023-08-30-x86_64-unknown-linux-gnu
rust-src
,rustc-dev
,llvm-tools-preview
7.0.0