masesgroup / NuReflector

Engine to produce Maven artifacts from NuGet packages
https://nureflector.masesgroup.com/
MIT License
1 stars 3 forks source link

Namespace which ends with Internal shall be reflected #17

Closed mariomastrodicasa closed 2 years ago

mariomastrodicasa commented 2 years ago

Describe the bug The core engine does not reflect namespaces which ends with Internal string. Some packages use this kind of namespace to identify public classes which are not part of the public API.

Expected behavior Reflect this classes

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context N/A

masesdevelopers commented 2 years ago

A feature request shall be opened in JCOReflector project.

masesdevelopers commented 2 years ago

Testing evolution with latest JCOReflector raised a new problem; an internal exception within the engine is not reported even if NuReflector sets: https://github.com/masesgroup/NuReflector/blob/aff0fb58e18dcda48c6d22c9f863139e3e0f0571/src/NuReflector/NuReflector.cs#L69

masesdevelopers commented 2 years ago

The latest version reports an incorrect Exception, the internal Exception becomes an ArgumentNullException. Anyway the engine becomes unusable: seems the problem is related to the throw clause moved within the catch which avoids to call the EndOperation handler and consequently does not cleanup the internal state.

masesdevelopers commented 2 years ago

Version 1.9.2 of JCOReflector has a new issue: if an assembly contains classes which does not have a Namespace it raises a NullReferenceException. The exception is raised in https://github.com/masesgroup/JCOReflector/blob/a98ba834e0c092d589bbbd9b6d18613860265c00/src/engine/Reflector.cs#L661