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

Unit test reproducing ProxyGenerationException using 3+ observer (issue #88) #89

Closed
wants to merge 1 commit into from

Conversation

smudge202
Copy link

Multiple (of the same) generic interface containing non-generic members can now be implemented.

…n-generic members can now be implemented
namespace CastleTests
{
[TestFixture]
public class MultipleRepeatedInterface
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the BasePEVerifyTestCase base class for your tests. Have a look at some other test cases how they use it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, once you do, you'll see that the solution doesn't really fix the problem as the assembly it generates is invalid.

@kkozmic
Copy link
Contributor

kkozmic commented Apr 26, 2015

Hey, nice find. And thanks for having a stab at fixing it. I think a proper solution is going to be a bit more involved though. PEVerify now will report the generated assembly as invalid.

Also, please have a look at http://docs.castleproject.org/Castle-Coding-Standards.ashx to make sure your changes follow the established coding rules. If you're using ReSharper, a full reformat should do most of that for you automatically.

As for the proper fix, I think instead of removing the code that throws you might want to have a look at how the Metaelements implement equality (MetaProperty etc). It feels to me that's where the actual root cause of the bug lies.

Happy to help if you have any questions.

@kkozmic
Copy link
Contributor

kkozmic commented Sep 10, 2015

hey @smudge202 just checking if you're still interested in this PR. Let me know if you need a hand with anything

@smudge202
Copy link
Author

@kkozmic I had all but forgotten this PR existed. The fix (and a locally hacked together build) worked for the our use case at the time if I remember correctly. I wanted to push the change back up if it would be of use, but I'm afraid I didn't have the time to jump the hoops of the coding standards.

I'm no longer working for the company from which this PR originated (4Com) so they may be interested in helping push this through, but it's unlikely I'll find the time personally. Sorry!

//CC @mattridgway @sblackler @herecydev

@kkozmic
Copy link
Contributor

kkozmic commented Sep 11, 2015

No worries. Thanks for the update

On Fri, 11 Sep 2015 22:35 Tommy [email protected] wrote:

@kkozmic https://github.com/kkozmic I had all but forgotten this PR
existed. The fix (and a locally hacked together build) worked for the our
use case at the time if I remember correctly. I wanted to push the change
back up if it would be of use, but I'm afraid I didn't have the time to
jump the hoops of the coding standards.

I'm no longer working for the company from which this PR originated (4Com
https://github.com/4com) so they may be interested in helping push this
through, but it's unlikely I'll find the time personally. Sorry!

//CC @mattridgway https://github.com/mattridgway @sblackler
https://github.com/sblackler @herecydev https://github.com/herecydev


Reply to this email directly or view it on GitHub
#89 (comment).

sent from my phone
Krzysztof

@ghost
Copy link

ghost commented Sep 11, 2015

Don't think we will need it for a while. I do remember this being a blocker for something though. Will let @mattridgway confirm

@mattridgway
Copy link

This was/is a dependency in a framework we were using in a project that is currently on-hold. We don't have the resources in work to contribute at the moment, but will resume when we can.

@herecydev
Copy link

@sblackler @kkozmic I think this will be needed, the problem is relatively easy to run into with generic interfaces.

@jonorossi jonorossi changed the title Resolves #88 Unit test reproducing ProxyGenerationException using 3+ observer (issue #88) Jul 22, 2016
@jonorossi
Copy link
Member

I'm going to close this stale PR for now. Issue #88 is still open.

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.

5 participants