-
Notifications
You must be signed in to change notification settings - Fork 525
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
Lockfile ordering to surface direct vs indirect references #165
Comments
You make it look like the dependencies are a tree or forest. Actually we have a graph that may contain cycles. |
Is that a bad thing? What does it imply/are you trying to imply? What do you think makes sense instead? I fully appreciate they are a graph. The algorithm is clear about what it does. The prior stuff in #123 makes a lot of this clear. Recall we started with mentions of hierarchy but I gave examples where it didnt make sense. Have a look at the examples in #123 before you consider this useless, not scalable or similar ;) So.... what's your point? I believe this achieves the following well:
It shouldnt matter but:
I can't say I cant imagine anything better but I think its a good textual representation of a complex graph (which even visually would be hard to pull something out of). |
No I didn't say it's useless.
|
I know. I'm trying to spark debate and/or trigger you gathering your thoughts as to what way we might achieve a better outcome in either a completely different way or by evolving this. I'd like to see an interesting question like "how will it deal with this set" or "in this case, the rendering hides the core fact one is after when analysing the set" ? I just know that the first time I tried to answer questions with the lockfile, Ctrl-F3 was extremely frustrating and it took me ages to manually derive the hierarchy (in fairness doing it by clicking about in the NuGet search windows in VS would be grossly worse and would have been my default option - same way I never formally realised how much time I've spent pressing update in VS). I think today I'd use Nuget Package Explorer btu every time I've wanted to answer a question recently, I've played it thorough this algorithm and it seems (with my confirmation bias anyway!) to be reasonably solid. I have played 3 or 4 things through this. If you look athe the MVC example, it actually produces quite a different sequence to WebApi. This tells me there are some cases where it's going to produce wierd results. Actually, there's prob a tree which will look like
which might trigger insight which either says the algorithm is not going to work or trigger an insight we can use to improve and not waste impl time (obv one could easily derive a rule for this case but it would be far better to have a real world tree from a complex case - perhaps I need to try http://github.com/AutoFixture/AutoFixture - it's got quite a lot of stuff and some subtle pinning rules that I happen to be familiar with). |
Re remote dependencies these can be shown in here, esp with #154 refinements - remote dependenceis can even be sufaced as a separate V neat concept. |
This proposal is a rework of #123 which takes into consideration the proposal for #154. To be honest the crickets over there are making me do this, with the aim of illustrating the value of unifying the concepts:
Say I have a deps file which has (as
paket simplify
would derive from a F# MVC 5 wizard- created WebApi 2 [only, no MVC element] app) :And my tests use:
Current
paket.lock
format:This results in a lock file like this today:
Proposed Output
If we have a tokenizer (#129) that understands the #154 syntax, and the resolver generates similar Pakets, then one can [conceptually] 'easily' produce:
Algorithm
paket simplify
would produce. Sort by<PaketId>
and emit with a blank line.dependency
entries one level down. Sort by<PaketId>
and emit with a blank line. (jquery
,Microsoft.AspNet.WebApi.Core
, 'Microsoft.AspNet.WebApi.WebHost` )dependency
items in the working set (Microsoft.AspNet.WebApi.Client
,Microsoft.Net.Http
)Newtonsoft.Json
,Microsoft.Bcl.Build
,Microsoft.Bcl
). Sort by<PaketId>
and emit with a blank line.Production rule used to compact output
nuget <NuGetPackageName> (<Ver>)
in the above is a rendering pattern match / substitution that replacespaket
specs with their primary source dependency id (in the case of a nugetv2 source, a<NuGetPackageId>
) matching thepaket's
`:=>
Comments please!
The text was updated successfully, but these errors were encountered: