-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Use Central Package Management #47664
Comments
It'd be good to follow up with .NET Core eng team to update Meastro to recognize |
@mmitche / @riarenas - I agree with @tmat that this makes sense to do. @ericstj - is there any opportunity here for unification with the packaging stuff runtime does do you think? It's probably too much of stretch, but any chance to have common ways of doing things seems like goodness. @jmarolf - how much of the implementation for Roslyn do you think is "sharable" with the rest of dotnet? If there's sufficient value there, it's be great to move to a common place for the whole product to use. |
@markwilkie this is about consuming packages which is orthogonal to the special production of packages done in dotnet/runtime. I see them as completely independent and think that dotnet/runtime would benefit from this work the same as any other repo and would adopt it. |
@tmat Can Directory.Packages.props pull properties from eng/Versions.props? If so you could avoid any Maestro changes. |
@mmitche Yes, that would be what we would do for now. We don't want to do that long term though as it breaks the IDE experience and is not the pattern we want our customers to use. |
@tmat Versions.props also carries a variety of other functionality (e.g. package versioning). It's also highly unlikely that we could backport all this to old versions of .NET, so it's likely that Versions.props as a source of version info will likely be around forever. But we could certainly have Maestro update both, potentially making a statement that if version appears in Directory.Packages.props, it should not appear in Versions.props to avoid information duplication. |
My approach is going to be to import |
I don't think this is something that dnceng should need to do anything special to support or, frankly, do any work at all. If other repos have situations where they need to manually update their nuget version (what roslyn does for 100% of its build dependencies) and also wants these versions automatically update (?) then I guess this won't work for them. Would need to understand what that repo is doing in that case. |
Is there a reason the VS tooling is so restrictive about what it will understand? |
Well MSBuild is a turing complete language. Supporting all patterns that are possible with it would be rather difficult in general. We need to draw the line somewhere. We could try and convince the nuget team to support Versions.props natively but I would also argue that arcade lies far outside the design of anything considered normal by .NET tooling. Supporting arcade in VS tooling implies that we think these patterns are normal and, frankly, they aren't. I do not want to hear that some external company has adopted the pattern of a using a powershell script to download a nuget package that contains a |
I think that's a good approach short term for Roslyn repo. I'm not saying we should block this Roslyn change and wait for Maestro to implement support for central package versioning. However, I disagree this is a good approach long term. As I already mentioned Versions.props was originally conceived to work around the lack of Project System/msbuild support for central package versioning. Since that feature is implemented now we should work towards removing the workaround.
Exactly my argument. We need to migrate Arcade to patterns that we want our customers to use. I think you are contradicting yourself a bit - on one hand you're saying that it's ok that Meastro doesn't support for Directory.Packages.props but then you're saying that Project System shouldn't add support for Versions.props because it's not what customers should be using. |
Definitely. All this is there to work around limitations in our products (msbuild, SDK, VSSDK, NuGet etc.). We wouldn't need a powershell script to find Desktop msbuild if we could build all repos on .NET Core. We could significantly simplify this stuff. Currently we can't use |
totally agree that the approach arcade is taking is the best we can do today for a myriad of reasons. My concern is that
Whereas We can look at productizing the other responsibilities of |
You are right, there is more in Version.props than package versions - I should have been more specific. What I meant above was only regarding package versions. Everything else would stay in Version.props. That is for Maestro to update versions in Directory.Packages.props based on Versions.xml (dependency flowing) and we would remove the |
I agree. I don't think that's really necessary. Let's just tackle package versions for now. |
I think we are aggressively agreeing here. So here is the work I think I am signing up for:
|
This bugfix has made it in 5.0 final and master branches of SDK and arcade repos. MSBuild, however, is still using arcade 3.x branch and 5.0 update work is tracked by dotnet/msbuild#5515. |
Problem
Back in the day when we had packages.config all the nuget dependencies were specified so our scheme of having a single props file that included all versions was always correct. Now that we get implicit dependencies in package references it is possible for us to have different implicit nuget package versions for different projects. It is also possible for these implicit package references to unify to different versions on a per-project basis.
Solution
Using central package management will (based on my initial investigations) allow nuget to fail the build if implicit dependencies resolve to different versions across projects. This also has the added benefit of us adopting a nuget feature that is expected to have VS UI support vs our current approach which we do not expect to ever be supported in VS.
Implementation
I would like us to adopt and use this feature in the most idiomatic way possible. According to the nuget docs that would mean adding a
Directory.Packages.props
file to our repo. Briefly prototyped this approach hereImplementation Blockers
The text was updated successfully, but these errors were encountered: