You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"type": "platform" Dependencies represented as "type":"package" in lock file #2695
In the cli, this is a meaningful difference.
The real issue is that restoring without "type":"platform" produces a different lockfile, but no way to determine (from the lock file) whether "type":"platform" is used. If a win10-x64 is present in the project.json, the "type": "platform" restored lock file will not list coreclr.dll as a native export, but the non "type": "platform" restored lock file will.
Also, in addition to platform, we need to know build type dependencies that might appear in a transitive lock file.
In my scenario, I'm reading the lock file to determine what the "true" dependencies are for the package that should be emitted to a nuspec file, and I nee d to tell if a package there is build or platform in a way that captures the transitive closure.
@rrelyea@emgarten - I just ran into this issue trying to write some MSBuild .targets files for the conversion from project.json to .csproj.
Any chance this bug can get fixed? The new .net core MSBuild targets and tasks shouldn't be dependent on project.json, so we are trying to read all necessary info from the project.lock.json file to use in our MSBuild logic.
type in project.lock.json corresponds to the target property from project.json currently.
Adding a new property to carry along some of the original project.json flags could make sense, but it sounds like build and platform would work very differently.
Build would need to be applied only to libraries which are not referenced by non-build dependencies.
Platform on the other hand would either need to be just on the top level package, or NuGet would have to attempt to figure out what that package was expecting for dependencies and then apply the flag only to those, and not to packages which were bumped to differing versions. It would also need to understand that if another package brought in a dependency already included in the platform set that it should still be marked as platform.
@emgarten Perhaps both properties could be applied to the top level node only and the logic to determine which parts of the subgraph rooted at that top level node (for either type build or platform) falls under that top level label can still be captured outside of the lock file.
For example in CLI today we do a graph walk to determine the type build exclusion list. I think the graph walk would still be okay for generating the exclusion list but we want to get the info of which packages declared type build from inside the lock file instead of inside the project.json
Activity
rrelyea commentedon May 2, 2016
likely need...an api so that CLI can detect if the lock file is out of date.
clairernovotny commentedon Jun 7, 2016
Also, in addition to
platform, we need to knowbuildtype dependencies that might appear in a transitive lock file.In my scenario, I'm reading the lock file to determine what the "true" dependencies are for the package that should be emitted to a nuspec file, and I nee d to tell if a package there is
buildorplatformin a way that captures the transitive closure.eerhardt commentedon Jul 25, 2016
@rrelyea @emgarten - I just ran into this issue trying to write some MSBuild .targets files for the conversion from project.json to .csproj.
Any chance this bug can get fixed? The new .net core MSBuild targets and tasks shouldn't be dependent on project.json, so we are trying to read all necessary info from the project.lock.json file to use in our MSBuild logic.
emgarten commentedon Jul 25, 2016
typein project.lock.json corresponds to thetargetproperty from project.json currently.Adding a new property to carry along some of the original project.json flags could make sense, but it sounds like build and platform would work very differently.
Buildwould need to be applied only to libraries which are not referenced by non-build dependencies.Platformon the other hand would either need to be just on the top level package, or NuGet would have to attempt to figure out what that package was expecting for dependencies and then apply the flag only to those, and not to packages which were bumped to differing versions. It would also need to understand that if another package brought in a dependency already included in the platform set that it should still be marked as platform.brthor commentedon Aug 1, 2016
@emgarten Perhaps both properties could be applied to the top level node only and the logic to determine which parts of the subgraph rooted at that top level node (for either type build or platform) falls under that top level label can still be captured outside of the lock file.
For example in CLI today we do a graph walk to determine the type build exclusion list. I think the graph walk would still be okay for generating the exclusion list but we want to get the info of which packages declared type build from inside the lock file instead of inside the
project.jsonrrelyea commentedon Oct 19, 2016
this was handled by dotnet/sdk#17
closing.