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

Fixed typed factory out of order disposal #344

Merged

Conversation

jnm2
Copy link
Contributor

@jnm2 jnm2 commented Sep 23, 2017

Fixes #114. See implementation rationale at #114 (comment).

This has been causing no small amount of trouble for my company, so hopefully this fix and rationale are adequate.

/cc @fir3pho3nixx @jonorossi

@hammett
Copy link
Contributor

hammett commented Sep 23, 2017

LGTM. I think you deserve some kind of medal for this one, even though the fix is simple, getting there was a brave man's endeavour. Thanks!

Copy link
Member

@jonorossi jonorossi left a comment

Choose a reason for hiding this comment

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

@jnm2 the code looks great, could I just get you to update the changelog and we'll merge.

@jonorossi jonorossi added this to the vNext milestone Sep 25, 2017
@jnm2
Copy link
Contributor Author

jnm2 commented Sep 25, 2017

@jonorossi Done. The next thing on my mind is, how soon would you consider a hotfix release to NuGet? If worst comes to worst I can build a package myself (your CI artifacts have versions like 0.0.162 which won't be seen as newer than 4.0.0) but I'd rather not have to worry about that.

@ghost
Copy link

ghost commented Sep 25, 2017

@jnm2 - The build version if defaulted to zero here. What you are seeing is a noddy appveyor counter running in the background which has no relevance to the release. Dev builds only.

When I worked on porting this project to AppVeyor @jonorossi and I made sure that tag versions for releases flow through to the final published NuGets. Tag = deploy.

If we are following semver than this looks like it will be in a 4.0.1 release.

@jnm2
Copy link
Contributor Author

jnm2 commented Sep 25, 2017

4.0.1 sounds good. Would you be willing to put at least a prerelease of 4.0.1 on NuGet within a week or so?

@ghost
Copy link

ghost commented Sep 25, 2017

Faster than that fella! That is why I reworked everything to use appveyor. We have no excuses for releasing early and often anymore :)

Before AppVeyor we used to hoard everything in master with no visibility of the background TeamCity server when merging PR's.

Your fix is shall we say ... imminent.

(* Which in my worlds means this week *)

@jonorossi jonorossi merged commit 702e348 into castleproject:master Sep 26, 2017
@jonorossi
Copy link
Member

Merged.

@jnm2 @fir3pho3nixx definitely, just need to cut a fresh Castle Core release (castleproject/Core#306) and get Windsor updated to end those assembly binding version problems.

Logged an issue so we can get this version out: #347

@MishaD87
Copy link

MishaD87 commented May 2, 2019

Hello,
I am currently having described problem. I have Castle.Windsor 4.1.1 and Castle.Core 4.3.1.
I have transient module that implements IDisposible and has dependency on typed factory.
Factory creates instances of objects with Singleton life cycle.
I create objects with factory in my module and trying to release them in Dispose method.
But getting this message "The factory was disposed and can no longer be used".
This exception happens when I am disposing container. So it looks like that it disposes factory first and only after component that depends on it

@jnm2
Copy link
Contributor Author

jnm2 commented May 2, 2019

@MishaD87 Would you be willing to open a new issue and provide the smallest sample code you can which demonstrates this? That'll take a lot of the guesswork out.

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.

TypedFactory Disposes Before Component That Depends on it
4 participants