Comments (6)
So, by what you say @xoofx you mean doing something along the lines of:
I thought about something maybe slightly simpler, that would require no changes in registry (kind of an implicit/transparent/automatic override):
If a Package A has a dependency to Package B v1.0 (that is not yet netstandard2.0
), but Package B only provides netstandard2.0
starting at v1.1, then we implicitly upgrade the dependency of Package A to B to v1.1 (we statically resolve the dependency >= v1.0 at startup time). The Package A would then say in its dependencies description that it really depends on v1.1.
What do you think?
So thanks for that @xoofx and good luck with all the work you have together with @joshpeterson and the rest of the team to bring us the best of the .NET ecosystem.
Thank you also for helping UnityNuGet, you brought most of the changes to it in the past year and that's super welcome if it can help lots of folks around! 👍
But agreed, we are all eager to move to CoreCLR and MSBuild SDK project.
from unitynuget.
Yes. (a different way to express it is
(we statically resolve the dependency >= v1.0 at startup time)
)
👍
Hm, not sure to understand. When I look at NuGet
protobuf-net
, the version2.3.6
supports netstandard 2.0, so why do you need to only register a 3.0.0 version?
Ok, sorry, you're right. I was fixated on 3.0.0 because of the fact that it depends on several System.* packages in 4.3.0 that do not target .netstandard2.0 but what we are talking about would turn the 2.3.6 version of protobuf-net into (upm manifest example):
{
"name": "protobuf-net",
"version": "2.3.6",
"dependencies": {
"system.reflection.emit": "4.6.0", // Originally 4.3.0.
"System.Reflection.Emit.ILGeneration": "4.6.0", // Originally 4.3.0
[...]
}
}
Once this PR is done we can take a look at all the entries in the registry.json file that have an "incorrect" minimum version since they do not point to the older version that targets .netstandard2.0 but to the minimum version where all its dependency chain complies with .netstandard2.0 targeting.
from unitynuget.
@xoofx How did you build this listing, i.e. where did you get it from? I need another one for .netstandard2.0:
Check the content of the NuGet package https://www.nuget.org/packages/NETStandard.Library/2.0.3 in the sub folder build\netstandard2.0\ref
and you will get the list of assemblies part of netstandard2.0
from unitynuget.
I have several doubts that you can solve.
I am going to represent it with the same case that we have been given of protobuf-net and I am going to put the minimum versions that support .NET Standard 2.0 (the example of the first post):
{
"protobuf-net": {
"listed": true,
"version": "3.0.0"
},
"protobuf-net.Core": {
"listed": true,
"version": "3.0.0"
},
"protobuf-net.Grpc": {
"listed": true,
"version": "1.0.0"
}
}
If a Package A has a dependency to Package B v1.0 (that is not yet
netstandard2.0
), but Package B only providesnetstandard2.0
starting at v1.1, then we implicitly upgrade the dependency of Package A to B to v1.1
All versions of protobuf-net.Grpc depend on protobuf-net in >= 2.4.x but it does not start to be until 3.x compatible with .NET Standard 2.0.
In this case that example that you put of dependency of 1.0 and that the 1.1 is the one of netstandard2.0, how we would solve it with protobuf-net?
If the version that we have in the registry.json file (3.0.0) is superior to the dependency that asks (>= 2.4.x) we read that one directly from registry.json entry (because we know that value it's compatible with .netstandard2.0) or do you mean to iterate over the version history of protobuf-net until we find the first one that targets .netstandard2.0 without using the registry.json entry?
(we statically resolve the dependency >= v1.0 at startup time)
I did not understand this sentence, can you explain it better?
The Package A would then say in its dependencies description that it really depends on v1.1.
By this you mean that we manipulate the upm package metadata (package.json dependencies) and modify the dependency from >= 2.4.x to >= 3.0.0, right?
from unitynuget.
By this you mean that we manipulate the upm package metadata (package.json dependencies) and modify the dependency from >= 2.4.x to >= 3.0.0, right?
Yes. (a different way to express it is (we statically resolve the dependency >= v1.0 at startup time)
)
I am going to represent it with the same case that we have been given of protobuf-net and I am going to put the minimum versions that support .NET Standard 2.0 (the example of the first post):
"protobuf-net": {
"listed": true,
"version": "3.0.0"
},
Hm, not sure to understand. When I look at NuGet protobuf-net
, the version 2.3.6
supports netstandard 2.0, so why do you need to only register a 3.0.0 version?
from unitynuget.
I am working on it and I have come up with a case where a dependency of a package has in turn another unnecessary dependency that causes it to fail (because there is no target to .netstandard2.0):
https://www.nuget.org/packages/protobuf-net/2.3.6#dependencies-body-tab
As you can see, it depends on System.Xml.XmlSerializer 4.3.0 but this dependency is already included in .netstandard2.0.
@xoofx How did you build this listing, i.e. where did you get it from? I need another one for .netstandard2.0:
https://github.com/xoofx/UnityNuGet/blob/master/src/UnityNuGet/DotNetHelper.cs
from unitynuget.
Related Issues (20)
- log4net issue with ConfigurationManager 4.5.0 HOT 1
- Customize the Unity package scope per imported package HOT 1
- Dlls from runtimes/{platform}/lib/{framework}/ are ignored
- New tag? HOT 1
- Limit Roslyn analyzers scope HOT 1
- registry.json: can't define package without flags HOT 3
- RegistryCache.cs: ignore Nuget.Config HOT 3
- Registry down HOT 6
- Meziantou analyzer includes assemblies not compatible with Unity
- Enable `Microsoft.CSharp` package HOT 1
- What to do with packages like those from AWS that are released daily? HOT 4
- Bug in how the registry checks for fulfilled dependencies? HOT 2
- unity core crash error HOT 3
- Registry.json miss Akka.Analyzers HOT 1
- Registry Down HOT 2
- Integrity checksum fails on many packages (Fork hosted on Azure) HOT 3
- R3 not showing up in package manager HOT 3
- Each deployment takes about 12 hours on Azure App Service HOT 4
- Unable to add package [[email protected]]... shasum check failed HOT 2
- Missing Agones Client SDK library HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unitynuget.