-
Notifications
You must be signed in to change notification settings - Fork 67
Breakup dependencies, e.g. with Configuration #97
Comments
Moving Config + Options into Options.ConfigurationExtensions |
Should we put that in a new repo to break the build dependency? cc @Eilon |
Can we put all of these in one repo instead? |
Possibly, if we can bring enough of the graph of dependencies together to avoid cycles. We should try. |
Options depends on DI and Config basically. Config doesn't depend on DI. |
Options should build pretty low in the stack, is there a ci build issue? |
The issue is that CI is slower than we want it to be, and one way we can improve that is to break dependency chains among repos, e.g. so that any time something changes on any given repo that doesn't trigger as many builds of other things. |
So we want to move the Configuration dependency outside of the Options repo? The problem is that Options depends on DI too, so we can't put it into Configuration. |
That is why I suggested a new repo. There is a obviously a balance between the overhead of maintaining yet another repo vs. the potential benefit breaking this particular chain. Others may have more context to evaluate that. |
ec13249 Options.ConfigurationExtensions |
I am using the DotNetCore.1.0.0-VS2015Tools.Preview2.exe with Visual Studio Update 3. I am unable to migrate code to read settings in the appsettings.json file from an MVC6 app. It uses the @Inject Microsoft.Extensions.OptionsModel.IOptions Settings syntax in a razor file to read the configuration. Of course, all of this is part of the worst release mess I've ever seen in msland. But is there any solution for this particular bit of madness? Thanks, |
leaving out the Microsoft.Extensions.OptionsModel.Options part I get this further error: |
Whenever you get errors like this you should do a dependency scan to make sure you're not mixing versions of things. If you upgraded your project from an rc1, make a new project and copy the assets over. RC2 -> RTM is more straight forward and there's a guide. |
Currently Options depends on Configuration because of the
serviceCollection.Configure(configuration)
overload.This means that any package that indirectly depend on Options also depend on Configuration, e.g. Entity Framework 7 depends on Caching which depends on Options which depends on Configuration, therefore even if we made the explicit decision not to couple Entity Framework with Configuration, the dependency exists and is carried even to places where it isn't commonly used, e.g. desktop .NET or Windows UAP applications.
The dependency could be broken by splitting the parts of options that depend from configuration (e.g.
serviceCollection.Configure(configuration) and its implementation class
ConfigureFromConfigurationOptions`) into their own package.Optionally, moving that package in its own repo would help breakup the chain of build dependencies for our CI.
The text was updated successfully, but these errors were encountered: