Skip to content

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

Closed
smudge202 wants to merge 1 commit intocastleproject:masterfrom
4Com:master
Closed

Unit test reproducing ProxyGenerationException using 3+ observer (issue #88)#89
smudge202 wants to merge 1 commit intocastleproject:masterfrom
4Com:master

Conversation

@smudge202
Copy link
Copy Markdown

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

…n-generic members can now be implemented
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

kkozmic commented Sep 11, 2015

No worries. Thanks for the update

On Fri, 11 Sep 2015 22:35 Tommy notifications@github.com 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
Copy Markdown

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
Copy Markdown

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
Copy Markdown

@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
Copy Markdown
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