-
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
Pakets #154
Comments
Good 10,0000 words! Fair enough. I know I'm spouting a lot of 'just' too :) I will hopefully be able to clear time to do some work on it in some sense (maybe even the 'writing teh codez` sense!). However I think it is extremely important that you, @agross and @ilkerde read and respond to this stuff at some point and we get some idea of whether any of my rantings are comprehensible and implementable in any reasonable timeframe. While it might be amusing for me to write the #129 and/or work on the core of this, I too feel it's a bit of a stretch to coordinate day to day dev work such as compexities of the resolution/installation algorithms with a parallel set of work going on related to this esp if I have no insight into how the Owners/Collaborators feel about all of this. Ultimately this stuff needs to either be deleted from the issues list or some high level plan developed. I think with some distillation and/or Issue-splitting, this can be sharded into a Rest assured I'm cross validating a lot of this based on
and it Just Makes Sense and, as a result, every fibre of my being is shouting This Has to Happen! It doesn't have to be this week or even next. But it does have to happen. |
Still on vacation, will probably find time to respond next week. AlexAlexander Groß On Thu, Sep 25, 2014 at 1:38 PM, bartelink notifications@github.com
|
I'm pretty sure we will break file formats before 1.0 - but not today. |
Cool. BTW the only stuff this would 'break' is The
Also, You said:
and
If you're referring to packing non-nuget packages in NuGets to complete the #166 story, that's not a ton of work at all - it's a small self contained bit of work after download. And then deleting code allowing it on the But I accept the "not today" central point of your argument. |
You make a comment about "This ties each file/nuget package to a single source (which I think is good - I want to know where stuff comes from, and doesnt require the doc to state that sources are order-sensitive)". I'm unclear whether this is in the .lock file (agreed, good idea) or in the .dependencies - in which case I can see several use cases where this would be unhelpful at best. Care to give a few more details on what you're thinking? :) |
source order doesn't matter in dependencies file. as long as source is defined before the package In lock file we pin the package to a source. |
@forki As @mavnn was suggesting, I am explicitly saying that the syntax rules (the idea came from my reading of #125 even if it doesn't necessarily intend this) are explicit about the source in both cases.
Clearly, in the
I know this is the case in the current impl. And I'm proposing to remove that. My syntax proposal is intended to at this point be explictly saying for the Deps and the Lock file "all sources are defined and named before we start in one place" I made the choice to have the sources at the top / in a config file that's read at the start on the following basis:
The choice to have the source bindings explicit is for all the reasons above plus:
Clearly it could be done that way but I chose not to. If you look at the examples, you'll see I use the source name pinning and >1 source in many cases. As I said, if I reference a package and I have a nuget and a myget feed I know which is supposed to come from which. I dont want to have to consider some decision making process when reasoning about where my stuff comes from. Right now, one can for example say
The way in which one models stuff that can switch is retargetting a source-alias. This is very much a strong opinion weakly held... I won't be surprised if there is one, and if we can agree my immediate next step will be to amend my statements that are trying to pin a different behavior and make this intention explict. So @forki can you explain the case where one can benefit in a clear way from reference needing an algorithm associated with it to decide which source it will be bound to in the EDIT: I guess the fact that all my examples use |
The current implementation is only because the idea of multiple sources There were a couple of problems with the original resolver which made this This is now fixed and I also prefer to put the nuget sources to the top.
|
@forki OK, but do you agree with the second principle: each and every source reference (either top level or within a
always means "find the source called ? |
No I don't agree. This will not work with indirect references which are on
|
I'm not @forki but I do not agree. :) First big issue is that the dependency of a "paket" may not come from the same source as the paket. The second big issue is that in source one, you may have version x.0 of a sub dependency, while in source two you have version x.1. You install a paket each from source one and source two that depend on the that sub dependency: they should both use version x.1 (otherwise, you get back into the whole multiple versions of the same package in the same solution nightmare). Issue three (not so big): I might have multiple sources that contain the same paket, and I just want the latest. I don't care where from. Obviously, all of these concerns only occur at the dependency definition stage. I completely agree that once you've locked, all of the locked deps should be coming from a known source. |
@forki I'll honestly hadnt considered that which is pretty silly, Doh! I'll be making the relevant edits. Right after I respond to @mavnn At this point, before I read @mavnn's answer, I'm still holding onto the concept for top-level ones....
That's covered - I was trying to be explicit about that in the earlier comment. A
In other words a top level It seems to me that the sources syntax should convey this - i.e. the grammar should, as part of you putting them there make you realize this. I'll look at how to best express this. Right now, all the source-alias concept in here is doing is confusing matter.
Clearly we need something that can be documented one way or the other. Even if its not yet implemented, we should make the goal clear. @forki (but also others) - should there be a way to say
And this is where the syntax does definitely make sense. But I'd really like to work out a way to not have a source-ref do double duty as it now is doing. Will thinkg. |
We might be using the term "paket" in different ways. I used to as a generic term for a package, which may or may not be nuget based, which you are choosing to depend on. The rest of my comment might now make more sense :) |
@mavnn No, you're getting it right - it's the whole point (as I allude to in the @ilkede references)! |
This is definitely not trivial, and it would be good to get a few of us perhaps in chat to clarify (maybe some time this afternoon?) I'm writing parsers at the moment, and there are certainly decisions which can be made which will make that a more or less complex task. I may need to understand the resolution approach better before I can offer constructive changes/suggestions. It would be good to have a chat as a group :) |
@kolektiv Def. The jabbr Paket room is for this. I'm going to think out loud in markdown with multiple lines here for now though :) Jabbr can be a disaster for >2 people considering a problem, and clearly >2 is important here! (I'm thinking I have cases where there needs to be a "floating ref" vs an "explicit" ref and I want them ruled in our out from the perspective of implementability of any kind in a sane resolution engine!) It seems to me that having an explicit vs loose syntax is important. Say I want to be able to say:
Then a proj
And all refs are to Aside from ruling this sort of thing in or out for short/medium/long term, the next issue that stems from this is how "source-neutrality" interacts with this.... if we have an explicit floating across sources syntax, However, if everything floats by default and we take the sources from #125:
Then The clearest syntax I can see to express that I want my custom xunit from
|
Right, prev sample has confused me but hopefully it'll help people gather thougts and answer this:
I think the big thing we need before we have any discussion of any kind is more examples of concrete cases where there is interplay between:
Step 1 is prob to rule each of these complicating factors is in or out. For instance I feel at this point that something can be achieved by keeping things explicit and rejecting graphs that previously had to be 'fixed up' by reordering sources. Maybe a ruleset such as:
What I'd like to see next is me stopping with the strawmen and @forki et al indicate the fundamental constraints/assumptions. i.e.
Once we have some clarity on that, I can stop laying out hypotheticals and try to resolve it into a workable set of edits to the original proposal. Unfortunately (for me but fortunately for others) I'm going to only be intermittently available for the next 4h and then offline for the 5h after that :( |
As a syntactical point rather than a semantic one, it would be ideal to change lines like
to
This makes parsers significantly simpler and doesn't, as far as I'm concerned, detract from readability (in fact it probably aids it). Avoiding the requirement for significant lookahead and backtracking in parsers is good when you can do it. Although I certainly can implement it as is, it seems like taking the simpler syntax where we can would be good? |
@kolektiv Am I being dense? I can't actually see the difference? |
@bartelink personal preference here, but:
|
@forki not totally sure I get what you mean. At the moment we don't have either of those syntaxes that I can see. For now would you prefer the parsers to implement the current form of Paket.dependencies, etc.? I.e.:
That's fine if so :) |
@kolektiv The intention was to have it symmetric with the consumption syntax. I did push it back and forth a few times. I buy your point that it might actually read more clearly the other way. Hence if you want to flip it based on that new input, I have no objection.
|
I will take a short pause while we decide on what we should implement now in terms of parsers (if it's parsers for what currently exists, integrated with the existing code, that's fine). I think it's perfectly reasonable to implement what we have now as a "proper" parser, get that integrated and building, and then move forward, evolving that to a new extended syntax, if people would like to do this that way. |
@mavnn how version ranges work is described in http://fsprojects.github.io/Paket/nuget-dependencies.html#Version-constraints also what we do work around broken packages (! Operator) @kolektiv yes I don't want to change the file formats at this point. But my hope is you can help to simplify our current parser monster by introducing FParsec. |
@forki cool, that's a good way to move forward. I think I can do that :) I'll have some lunch and then spike that. |
@kolektiv Sorry, I should have made it clearer in my #129 comments that it needs to be clarified whether it's "current code", #125 or #154 it's to be based off. At least that's clear now. |
It is very hard for me to follow Paket discussion and get an oversight about the status quo, both on issues as well as conceptually. Please bear with me if I miss things. First, I'd like to give my prefs on the obvious open ends as requested by @bartelink:
A personal note: @bartelink I really appreciate your detail and elaborateness. However, it's very hard for me as non-native english speaker to understand everything what you write. This is certainly my fault being very limited on my english. Please bear with me if I don't understand everything at first sight. |
@kolektiv changing source definition syntax from
to
is very ok with me at least. |
I'd like to propose a consolidated grammar for the
dependencies
,lock
andreference files
based on:@ilkerde's Only have dependencies in
paket.dependencies
#125 : Only have dependencies inpaket.dependencies
My spiking in Lock file should be more legible #123 : Lockfile should be more legible
My rantings and other's ideas in File dependencies from arbitrary URLs #114: File dependencies from arbitrary URLs
established conventions in htp://nikcodes.com/2013/10/23/packaging-source-code-with-nuget/
The call to action in @ilkerde's comment:
Grammars
paket.references
files:Grammar:
paket.lock
file:Grammar:
<NuGetUrl>
:http://nuget.org/api/v2
<RepoAndSubDir>
:forki/FsUnit
<NuGetPackageId>
:NUnit.Framework
<AssemblyName>
:System.Numerics
<VerSpec>
:5.2.2
<Hash>
:abc12abc12abc12abc12abc12abc12
<DepSpec>
:(>= 5.2.2, < 5.3.0)
<FileSourceName>
\\MyServer\MyShare\IsReallyReliable
paket.dependencies
file:Grammar:
Examples as per
dependencies file
(it's just the same syntax with some elements removedtop level
<NuGetSourceName> <NuGetPackageId> [<VerSpec>]
translates to:top level
<FileSourceName> <FileName> [<DestinationPath>]
translates to:inside a
paket <PaketId>
block,<FileSourceName> <FileName> [<DestinationPath>]
has the following default pattern:<DestinationPath>
is not supplied, it'sApp_Packages\<PaketId>\<FileName>
Notes
<PaketId>
s are case-insensitive strings<PaketId>
(which may ultimately be either aFileName
or a<NuGetPackageId>
import paketfilepath.paket
primitive which sucks in children recusively (see examples for why one might use that)strict
mode but to be honest I don't completely understand it and I'd like to make sure it squares well with this proposalPaket Caching
packages
nupkg
files but don't have to initially (but see laundry list in File dependencies from arbitrary URLs #114 for reasons why)Paket Installation
paket install
reads the Lock File, and walks thereferences
files finding<PaketId>
s.dependency
items are recursively traversed<NuGetSourceName> <NuGetPackageId> [<VerSpec>]
elements are installedframeworkAssembly
translates to a<Reference
(same as NuGetframeworkAssemblies
)paket
s to.nupkgs
)<FileSourceName> <FileName> <DestinationPath>
elements translate to<Compile
links)Examples
The examples below assume the following sources:
Math with required assembly reference and helpers file
Testing paket with helpers
Unit-Testing specific, built on
paket Testing
Property-based testing based on
paket Testing
Property-based testing based on
paket Testing
, private build on mygetFor the Living Documentation with mad helpers that live on a share
fssnip
usageFor @bartelink's Web Apps, house-style
For @bartelink's Web Apps, after some evolution
@forki's house style for tests
The text was updated successfully, but these errors were encountered: