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
With VS2015 and ASP.NET 5 a new project format for asp.net projects is introduced. This has the new extension .kproj and beside of that exists a project.json (https://github.com/aspnet/Home/wiki/Project.json-file) which describes the dependencies of that project.
The problem here is, that vNext comes with its own package manager (kpm), that downloads all dependencies by default in the folder user profile (subfolder: ".k"). I think that should keep global dependencies locally (per profile). KPM seems just to be enabled to operate with the nuget API.
This leads to the situation that in one solution we can have nuget and KPM side-by-side.
I don't see currently any solution how I can enable Paket with vNext when I switch some projects to vNext. I only see currently that you can specifiy which kre (K runtime) where maybe paket could be triggered from to resolve the references.
Has anyone else already investigated that issue or some ideas that we can try out?
Side note: the documentation of kpm is very basic and a lot of its commands are not documented.
So far I see a project.json file per WebApplication project. This file is json and could be easily edited from paket. We would need to write package name and resolved version (from our lock file) into this file.
@forki I'm not sure how easy and good it is to leave the dependencies block empty as it's not just only required for Visual Studio and tools such as OmniSharp to know about specifiy dependencies, it is also required by the build tools to resolve build dependencies. Keep in mind that the .kproj files are a combination of packages.config and .csproj files. Additionally you can not only specify global dependencies for your project through the root dependencies block, but you can also do this per architecture for scenarios where a specific package is not (yet) ported to make it work cross-plat. This makes it necessary to reflect this kind of feature in paket.references files.
Another thing about dependencies: You're able to override NuGet packages with a local version by simply specifiying a path to the source code
Furthermore building the actual project would also require Paket to pre-process project.json before it can actually build. Though this could be done through the prebuild event, which could execute Paket which then modifies the project.json etc.
Thanks. I get the feeling that from a dependency "management" standpoint things even got worse. Bit hopefully it's just my lack of understanding right now.
just to clarify my "merge conflic" comment in #736 (comment)
the issue is: project.json is basically a merge of packages.config and csproj (maybe with better format).
But since paket would need to generate the dependencies block (and the block contains version numbers) every package update needs to touch the project.json. So if two persons in the team update at the same time you will get a merge conflict there. At the worst part is: you can't gitignore that file since it also contains the rest of the csproj information.
Not sure why you need paket un this world (not to say you need or not), I would start with describing the scenarios paket improves in this world and understand the value proposition, then dicuss how to fit it in
You don't need to touch the msbuild script. Just create the lock file
Sent from my Windows Phone
From: Steffen Forkmannmailto:[email protected]
Sent: 11/9/2015 11:38 PM
To: fsprojects/Paketmailto:[email protected]
Cc: Yishai Galatzermailto:[email protected]
Subject: Re: [Paket] Paket support for vnext project files (#736)
@davidfowlhttps://github.com/davidfowl thanks. That's the answer I was hoping to get. Last questions: in things like VS would it be enough to have the project.lock.json and a project.json without dependencies? Or is VS looking for that block? and do we need to replace the whole MSBuild import or is there a smaller part that handles dependencies and where we can hook into?
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/736#issuecomment-155345902.
@yishaigalatzer but I assume there are events in the IDE that trigger an overwrite of the project.lock.json. Maybe something like adiing a file? Or is it only generated when someone touches the dependencies?
That's the answer I was hoping to get. Last questions: in things like VS would it be enough to have the project.lock.json and a project.json without dependencies?
Untested. There are a few things that would make the experience a bit rocky today. Automated package restore on save is one of them. You could imagine making that pluggable so we can run specific tools when restore is kicked off. We also put projects in the lock file today and we need a way to work that out as well.
Or is VS looking for that block? and do we need to replace the whole MSBuild import or is there a smaller part that handles dependencies and where we can hook into?
Be a quick win here? Existing tooling (vs/omnisharp) can keep calling dnu restore and the intend that an external tool is managing the deps is clearly communicated.
I haven't tested the latest bits, but at least with beta4, removing the dependencies out of project.json causes the following error on application start up.
I don't know if it's feasible, but it would be nice if DNX could just use project.lock.json on start up for resolving dependencies. That way any tool that can write that file could be used with something like @Mpdreamz's syntax
@nosami beta4 is old. We're at RC1 now 😄 and the behavior is very different.
@Mpdreamz Sure the idea is fine but I'm not a fan of like that syntax. We'll look at something that is more natural. I'm not going to hack something in just to make paket work. It needs to gel with the rest of the system.
My suggestion would be to try it out and file issues for individual thing as you encounter them. The system is optimized for having dependencies all in a single file, not split across files. Also project references need to be taken care of which is another can of worms 😄.
I mean I must be clearly doing something wrong here. 19k lines in a generated file. that cannot be correct, right? @Mpdreamz if you really want to lock versions (in paket's sense of a lock file) then you would have to commit that file, right? I mean project.json doesn't contain version numbers for transitive dependencies. What am I missing?
@forki thats what aspnet/dnx#2332 is about, to split the two responsibilities that project.lock.json currently has (caching of compilation info for DNX and resolved deps) in to two separate files.
Here is my understanding so far. MSBuild based projects have moved the dependencies out of the .proj files to a project.lock.json. The project.lock.jsonshould not be committed to the repository and should be in .gitignore. A dnu or nugetrestore uses a project.json and creates a project.lock.json. paket should support creating a project.lock.json instead of modifying the dependencies in the .proj files to support this new MSBuild world. Let me know where I am wrong. :)
@ctaggart yes in principle we'd like to do that, but the rest of the infrastructure needs to understand that the top-level dependencies are not in maintained in project.json. And project.lock.json must only contain package specific information and not "project system" information. Otherwise Paket needs to do things that are out of scope.
Activity
forki commentedon Mar 29, 2015
yep. that thing is pretty bad and we don' know how to get into this stuff, yet.
[-]Paket support for oncoming project files[/-][+]Paket support for vnext project files[/+]Stift commentedon Mar 29, 2015
I currently try to find out how something can be hooked up in the KRE.
forki commentedon Oct 22, 2015
OK, let's discuss what would be needed.
So far I see a project.json file per WebApplication project. This file is json and could be easily edited from paket. We would need to write package name and resolved version (from our lock file) into this file.
But this would reintroduce mergeconflicts outside of paket.lock ;-(
Ideally we would let this block empty and just use references file.
packagesfolder anymore ;-(forki commentedon Oct 22, 2015
/cc @ctaggart
keichinger commentedon Oct 23, 2015
@forki I'm not sure how easy and good it is to leave the
dependenciesblock empty as it's not just only required for Visual Studio and tools such as OmniSharp to know about specifiy dependencies, it is also required by the build tools to resolve build dependencies. Keep in mind that the.kprojfiles are a combination ofpackages.configand.csprojfiles. Additionally you can not only specify global dependencies for your project through the rootdependenciesblock, but you can also do this per architecture for scenarios where a specific package is not (yet) ported to make it work cross-plat. This makes it necessary to reflect this kind of feature inpaket.referencesfiles.Another thing about
dependencies: You're able to override NuGet packages with a local version by simply specifiying a path to the source codeFurthermore building the actual project would also require Paket to pre-process
project.jsonbefore it can actually build. Though this could be done through theprebuildevent, which could execute Paket which then modifies theproject.jsonetc.Maybe this one here helps clarify a few things: https://github.com/aspnet/Home/wiki/Project.json-file
forki commentedon Oct 23, 2015
Thanks. I get the feeling that from a dependency "management" standpoint things even got worse. Bit hopefully it's just my lack of understanding right now.
forki commentedon Oct 23, 2015
Exactly. Now things are even more coupled.
Mpdreamz commentedon Oct 23, 2015
Related. I would love some to get some more voices on this issue aspnet/dnx#2332
forki commentedon Nov 5, 2015
just to clarify my "merge conflic" comment in #736 (comment)
the issue is: project.json is basically a merge of packages.config and csproj (maybe with better format).
But since paket would need to generate the dependencies block (and the block contains version numbers) every package update needs to touch the project.json. So if two persons in the team update at the same time you will get a merge conflict there. At the worst part is: you can't gitignore that file since it also contains the rest of the csproj information.
forki commentedon Nov 6, 2015
/cc @nosami @davidfowl @yishaigalatzer @csharpfritz do you see a solution for us to make this work?
yishaigalatzer commentedon Nov 9, 2015
Not sure why you need paket un this world (not to say you need or not), I would start with describing the scenarios paket improves in this world and understand the value proposition, then dicuss how to fit it in
isaacabraham commentedon Nov 9, 2015
@yishaigalatzer I think that some of the problems that paket is trying to solve is to remove project-level versioned dependencies, which are still present in project.json, as well as (apparently?) having to store all dependencies, not just top-level dependencies, at the project level. Have a quick read of the Paket FAQ - the first section answers this question pretty succinctly (http://fsprojects.github.io/Paket/faq.html#I-don-t-understand-why-I-need-Paket-to-manage-my-packages-Why-can-t-I-just-use-NuGet).
Mpdreamz commentedon Nov 9, 2015
@yishaigalatzer I tried doing that on the previously linked DNX ticket:
yishaigalatzer commentedon Nov 9, 2015
Most of these reasons above do not apply.
With project.json you
So although some things are not available (like solution level dependencies), I would challenge to define the needs and then how to deal with them.
18 remaining items
yishaigalatzer commentedon Nov 10, 2015
You don't need to touch the msbuild script. Just create the lock file
Sent from my Windows Phone
From: Steffen Forkmannmailto:[email protected]
Sent: 11/9/2015 11:38 PM
To: fsprojects/Paketmailto:[email protected]
Cc: Yishai Galatzermailto:[email protected]
Subject: Re: [Paket] Paket support for vnext project files (#736)
@davidfowlhttps://github.com/davidfowl thanks. That's the answer I was hoping to get. Last questions: in things like VS would it be enough to have the project.lock.json and a project.json without dependencies? Or is VS looking for that block? and do we need to replace the whole MSBuild import or is there a smaller part that handles dependencies and where we can hook into?
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/736#issuecomment-155345902.
forki commentedon Nov 10, 2015
@yishaigalatzer but I assume there are events in the IDE that trigger an overwrite of the project.lock.json. Maybe something like adiing a file? Or is it only generated when someone touches the dependencies?
davidfowl commentedon Nov 10, 2015
Untested. There are a few things that would make the experience a bit rocky today. Automated package restore on save is one of them. You could imagine making that pluggable so we can run specific tools when restore is kicked off. We also put projects in the lock file today and we need a way to work that out as well.
Like @yishaigalatzer said, the lock file is all you need.
Mpdreamz commentedon Nov 10, 2015
Would something like:
and e.g this in
global.json{ "projects": [ "src" ], "restore" : "/.paket/paket.exe $file", }Be a quick win here? Existing tooling (vs/omnisharp) can keep calling
dnu restoreand the intend that an external tool is managing the deps is clearly communicated.nosami commentedon Nov 10, 2015
I haven't tested the latest bits, but at least with beta4, removing the dependencies out of
project.jsoncauses the following error on application start up.I don't know if it's feasible, but it would be nice if DNX could just use
project.lock.jsonon start up for resolving dependencies. That way any tool that can write that file could be used with something like @Mpdreamz's syntaxdavidfowl commentedon Nov 10, 2015
@nosami beta4 is old. We're at RC1 now 😄 and the behavior is very different.
@Mpdreamz Sure the idea is fine but I'm not a fan of like that syntax. We'll look at something that is more natural. I'm not going to hack something in just to make paket work. It needs to gel with the rest of the system.
My suggestion would be to try it out and file issues for individual thing as you encounter them. The system is optimized for having dependencies all in a single file, not split across files. Also project references need to be taken care of which is another can of worms 😄.
forki commentedon Nov 11, 2015
just tried to upgrade an new/empty beta8 project to rc2. Generated project.json.lock is 19705 lines.
I don't think that's scope of Paket.
forki commentedon Nov 11, 2015
I mean I must be clearly doing something wrong here. 19k lines in a generated file. that cannot be correct, right? @Mpdreamz if you really want to lock versions (in paket's sense of a lock file) then you would have to commit that file, right? I mean project.json doesn't contain version numbers for transitive dependencies. What am I missing?
Mpdreamz commentedon Nov 11, 2015
@forki thats what aspnet/dnx#2332 is about, to split the two responsibilities that project.lock.json currently has (caching of compilation info for DNX and resolved deps) in to two separate files.
forki commentedon Nov 11, 2015
yes I was wondering if this is still the case.
build coreclr version using nuget -- because we need project.json.loc…
ctaggart commentedon Nov 11, 2015
Here is my understanding so far. MSBuild based projects have moved the dependencies out of the .proj files to a
project.lock.json. Theproject.lock.jsonshould not be committed to the repository and should be in.gitignore. Adnuornugetrestoreuses aproject.jsonand creates aproject.lock.json.paketshould support creating aproject.lock.jsoninstead of modifying the dependencies in the .proj files to support this new MSBuild world. Let me know where I am wrong. :)forki commentedon Nov 11, 2015
@ctaggart yes in principle we'd like to do that, but the rest of the infrastructure needs to understand that the top-level dependencies are not in maintained in project.json. And project.lock.json must only contain package specific information and not "project system" information. Otherwise Paket needs to do things that are out of scope.
forki commentedon Nov 18, 2015
closed as "won't fix" see #1230 (comment)