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

Updating Windsor to support Castle.Core@5.0.0 and modern TFMs #612

Closed
Jevonius opened this issue May 12, 2022 · 15 comments
Closed

Updating Windsor to support Castle.Core@5.0.0 and modern TFMs #612

Jevonius opened this issue May 12, 2022 · 15 comments
Milestone

Comments

@Jevonius
Copy link
Contributor

With the release of Castle.Core@5.0.0, Windsor needs updating to support it as there are breaking changes (some detail in #610). 5.0.0 also has an updated list of TFMs:

<TargetFrameworks>net462;netstandard2.0;netstandard2.1;net6.0</TargetFrameworks>

The current targets for Windsor are:

Castle.Facilities.AspNet.Mvc = net45
Castle.Facilities.AspNet.Mvc.Tests = net45
Castle.Facilities.AspNet.SystemWeb = net45
Castle.Facilities.AspNet.SystemWeb.Tests = net45
Castle.Facilities.AspNet.WebApi = net45
Castle.Facilities.AspNet.WebApi.Tests = net45
Castle.Facilities.AspNetCore = netstandard2.0
Castle.Facilities.AspNetCore.Tests = netcoreapp2.0
Castle.Facilities.Logging = net45; netstandard2.0
Castle.Facilities.WcfIntegration = net45
Castle.Facilities.WcfIntegration.Demo = net45
Castle.Facilities.WcfIntegration.Tests = net45
Castle.Windsor = net45; netstandard2.0
Castle.Windsor.Extensions.DependencyInjection = netstandard2.0
Castle.Windsor.Extensions.DependencyInjection.Tests = net5.0; 
Castle.Windsor.Tests = net45; net5.0

Having not done much with the Windsor codebase, is it insane to suggest aligning with the Core TFM list, where reasonable? Does targeting net6.0 even make sense for Windsor? At the very least, it should support net462;netstandard2.0 against Castle.Core@5.0.0, which might be a good first step.

Could also consider retiring some of the Facilities, download counts don't always set the world on fire (https://www.nuget.org/packages/Castle.Facilities.AspNet.Mvc/, https://www.nuget.org/packages/Castle.Facilities.AspNet.WebApi/).

Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 14, 2022
castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 14, 2022
This is dead code; with the previous switch to netstandard2.0, the missing functions became available  and this code stopped being built.

castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 14, 2022
castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 14, 2022
castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 14, 2022
castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 14, 2022
Castler.Core deprecated CAS handling (castleproject/Core#502), this commit restores the relevant method and associated test.

castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 14, 2022
… helper method

castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 14, 2022
…tor`

See castleproject/Core@66ad575 for more information

castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 14, 2022
…rArgumentsException` is deprecated

castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 14, 2022
Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 14, 2022
…ing on runtime

castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
@jonorossi
Copy link
Member

is it insane to suggest aligning with the Core TFM list, where reasonable? Does targeting net6.0 even make sense for Windsor? At the very least, it should support net462;netstandard2.0 against Castle.Core@5.0.0, which might be a good first step.

Haha, I just finished reviewing your PR and asked the same question. Happy for it to be a 2 stage process. At this point I don't see much point adding more support for .NET Standard if no one has a reason for it, adding .NET6 is probably the way to go moving forward if .NET Standard is taking a back seat.

Could also consider retiring some of the Facilities

Best to keep this issue to the one topic, it allows people following the repo to track changes easier. Happy to discuss those 2 in another issue.

Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 14, 2022
castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 14, 2022
This is dead code; with the previous switch to netstandard2.0, the missing functions became available  and this code stopped being built.

castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 14, 2022
castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 14, 2022
castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 14, 2022
castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 14, 2022
Castler.Core deprecated CAS handling (castleproject/Core#502), this commit restores the relevant method and associated test.

castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 14, 2022
… helper method

castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 14, 2022
…tor`

See castleproject/Core@66ad575 for more information

castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 14, 2022
…rArgumentsException` is deprecated

castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 14, 2022
Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 14, 2022
…ing on runtime

castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 24, 2022
castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
Jevonius added a commit to Jevonius/Castle.Windsor that referenced this issue May 24, 2022
Windsor doesn't have internals visible to test projects, and not worth adding for one test case. This is code brought across unchanged from `Castle.Core` and is likely to be deprecated soon, as CAS is phased out.

castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
@rsr-maersk
Copy link

Any luck here with a new build here. Latest Moq gives:
image
on integration tests with:
_container = new WindsorContainer();

@tasoss
Copy link

tasoss commented Jul 13, 2022

Is there any way to help with this one? @Jevonius

@Jevonius
Copy link
Contributor Author

It looks like @jonorossi and @stakx are the only two maintainers for Castle at the moment, so we're kinda stuck waiting for them to have some time to look at this.

If you have any thoughts on #616, I can look to have that ready in a separate PR to be reviewed at the same time.

@tasoss
Copy link

tasoss commented Jul 15, 2022

I see.
It's a shame we can't use castle with .NET 6.
About #616 i wish i could help you.
Thanks for replying btw!

@Jevonius
Copy link
Contributor Author

Yeah, it's a pain there's such a critical issue with no workaround. Hopefully there will be some progress soon :)

@stakx
Copy link
Member

stakx commented Jul 16, 2022

@Jevonius, I've only really done work on DynamicProxy; I hardly know Windsor at all. So I'm afraid I'm not in the best position to help out here. That being said, I could probably take an hour or two to review any PRs, if that would still be helpful at all.

@tasoss
Copy link

tasoss commented Jul 16, 2022

Ok, so only @jonorossi could help...
Waiting for news from him.

@jonorossi
Copy link
Member

@Jevonius I coded reviewed the pull request the day after you created it, it looks like you made further commits afterwards and further comments with the last one starting "Haven't had a chance to get back into the code for this". I assume it's ready to re-review and merge?

@Jevonius
Copy link
Contributor Author

@jonorossi apologies, I did push some further commits, but didn't comment in that thread so hadn't twigged you wouldn't magically see that it was ready to go 😆 I did request another review later on, but that might have slipped through the cracks.

So, #613 is ready to review, I'll make a comment there to be clearer.

I'm doing the net6.0 changes separately, if you have any thoughts on #616 that would be helpful - I'm not sure as this point whether to just drop the Facility support, or try and make it work with a bodge :)

@Jevonius
Copy link
Contributor Author

@tasoss - coincidentally I was cleaning up some [very] old tabs/windows the other day and one of them was NancyFx/Nancy.Bootstrappers.Windsor#57 - I'd been having the same issue. Small world 😄

@jonorossi jonorossi added this to the v6.0.0 milestone Jul 19, 2022
@tasoss
Copy link

tasoss commented Jul 19, 2022

@Jevonius @jonorossi thanks for closing this issue.
@Jevonius hahahahahaha.Indeed!

@tasoss
Copy link

tasoss commented Jul 29, 2022

What are we waiting for v6.0.0 ?
Aren't #611 and #604 fixed already? @jonorossi

@haldiggs
Copy link

haldiggs commented Aug 5, 2022

upgraded to Castle.Core 5.0.0, Castle.Windsor 5.1.1 and getting the Could not load type 'Castle.Core.Internal.PermissionUtil' error seen by so many. Cannot upgrade Castle.Windsor 5.1.2 where they say this might be fixed because the requirement says Castle.Core < 5.0.0 ... I guess all I can do is downgrade and wait for 6.0

@jonorossi
Copy link
Member

@haldiggs This is exactly why we released 5.1.2. NuGet doesn't care about a major version change and just assumes it'll be compatible. Yes, you'll need to use Castle Core < 5.0.0.

@tasoss tasoss mentioned this issue Nov 30, 2022
6 tasks
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

No branches or pull requests

6 participants