cecil icon indicating copy to clipboard operation
cecil copied to clipboard

Add importing of netmodule

Open kant2002 opened this issue 2 years ago • 6 comments

Closes #818

kant2002 avatar Dec 13 '21 04:12 kant2002

Hi @kant2002! Thank you for your PR!

Is this an actual case you're hitting? While the code seems to make sense, could you add tests for it?

Thanks!

jbevain avatar Jan 13 '22 00:01 jbevain

@jbevain I was hitting that in the actual snippet which I wrote in the issue. That snipped was created by @fornever when he play with C compiler in .NET. He probably can explain more.

Regarding tests, what's proper place to add test for this case? I was looking for them, but I cannot find nice place where I can validate case.

kant2002 avatar Jan 13 '22 07:01 kant2002

Hey!

The place to add a test would be there:

https://github.com/jbevain/cecil/blob/master/Test/Mono.Cecil.Tests/ImportCecilTests.cs

Thanks!

jbevain avatar Jan 13 '22 21:01 jbevain

That snipped was created by @ForNeVeR when he play with C compiler in .NET. He probably can explain more.

This was an experiment while I was investigating how to create/use a .netmodule file using Cecil (in a project where I'm trying to create a fully C17-compatible compiler using Cecil, among other tools).

Initially, I wanted to mimic the full C-style compilation: creating a separate .netmodule for every translation unit, and then linking them together using the .NET assembly linker (al.exe, IIRC).

Though right now I've deserted this approach (not because of any Cecil problems, but because I don't think it's appropriate). So, there are no any actual uses of .netmodules in my code at the moment.

It not impossible I'll decide to play with them again later, but not too likely, either.

ForNeVeR avatar Jan 15 '22 16:01 ForNeVeR

@jbevain I think this is ready for another round of review.

kant2002 avatar Jan 17 '22 17:01 kant2002

@jbevain New year is soon. I behave well, so may I have some present on New Year, or on Christmas ?

kant2002 avatar Dec 14 '23 07:12 kant2002