Skip to content
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

Add importing of netmodule #819

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kant2002
Copy link

Closes #818

@jbevain
Copy link
Owner

jbevain commented Jan 13, 2022

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!

@kant2002
Copy link
Author

@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.

@jbevain
Copy link
Owner

jbevain commented Jan 13, 2022

Hey!

The place to add a test would be there:

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

Thanks!

@ForNeVeR
Copy link

ForNeVeR commented Jan 15, 2022

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.

@kant2002
Copy link
Author

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

@kant2002
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create type in separate netmodule not supported
3 participants