-
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
Should the project's package file support direct dependencies only? #38
Comments
BTW, bundler allows referencing indirect dependencies. I'd say with great power comes great responsibility. |
I think we make it optional to add indirect dependencies to the packages file. Will implement this. Would also be good to put this question into the docs |
I opt for allowing direct and indirect dependencies. I think it is fairly ok to keep direct deps in In the end, Paket would have two sets at hand: with |
First of all we changed our naming a bit. We now have package.list files. They replace the old packages.config files which are next to csproj files. See https://github.com/fsprojects/Paket/blob/master/src/Paket/packages.list for sample. At the moment we support both, direct and indirect package names in this file. If you only specify the direct ones, then Paket will figure it out for you. |
@forki I'm obviously not up to the pace you are on. I don't have an idea on how |
Paket is not needed to get the app running. Only to update dependency definitions. Will update docs tomorrow |
@forki Thanks for pointing that out. I am well aware that the references are in *proj files. The case here is that if you only refer to direct dependencies in My point is, that John Average (that's me) may wonder why there are so many (missing) references in project, will have a look at the |
/cc @agross - I'm not really sure what we should do here
|
Well, we've talked about it. There are two options, being explicit about all project dependencies in Since we don't tell paket about indirect dependencies in If @ilkerde is favoring to be explicit in |
Fair enough. Does it mean then that I can configure Paket to be "strict" or "loose"? |
@agross @forki The longer I think about it, the more doubtful I get about omitting indirect dependencies in The main reason is simply sanity. A (quasi) mirror of dependencies in @agross I know you feel fine with the laissez-faire model to just let the user decide what's in |
@agross came up with a setting in the Paket. dependencies file:
Or implicit:
I assume we would also have to transport it to the lockfile |
Another option: |
I've scanned most, but can't say I've necessarily grokked it top to bottom but... Certainly, for webapi, it's nice to be able to say:
When the
How about the default being implicit refs included and put a |
@agross I pretty much favor In general, I want to make sure we are talking about the same thing and therefore quickly reiterate my perspective. I am very fine with I am well aware that my perspective is conservative (and a little paranoid). Tbh, I'm not sure if we will benefit from the full ref list, but my gut feeling says "have the list for the time being". Sorry for being so subjective on that one. My background for bringing this concern onto the table is my hope that Paket will have such proj sanity features in future as well. |
@ilkerde I assume you're attempting to achieve something specific and important, but I'm unable to infer it from the above. I'd like to get you to clarify some matters by addressing the following:
Please don't take the above as rejecting your ideas; I actually want to know what they are specifically :) What do you mean by "Paket will have such proj sanity features" ? AFAIK AspNetVNext makes references to NuGets a first class thing in a BTW for me Thinking out loud: So you want paket install/update to start flagging (and stopping?) whenever any item in the references file has a reference to stuff not listed in the file? Could the syntax change to require me to say:
(i.e. the If that was the way, Paket could say @forki Is there doc somewhere for this mode thing in the deps? Modal stuff like this makes files harder to understand IME... Could one have a modifier on e.g. the version specifier etc. achieve the same effect? |
@bartelink The lockfile is sorted alphabetically. Does that clear things up? |
@agross Yes, I can see that. I'm saying I think it should be sorted by first by dependency hierarchy depth (and alphabetically after that) (And/or indentation to make the successive derivation/spidering phases explicit. @forki Avoiding temptation to go look at source to see whether these successive phases of downloading / processing are already nicely parallelized in the impl - guessing a yes! :P) |
@bartelink Hm, well, that's two perspectives on the same data. I always found alphabetical ordering very helpful when reasoning about my dependencies. Could you give an example of what #38 (comment) would look like with your preferred ordering? |
Grouped:
|
BTW the |
Alternate views with redundant copies of stuff might make tracing individual decisions either but I can't think of a way of not having it confusing. Will think though... |
Currently there's the idea to use a project-specific
packages
file to define the subset of package IDs that paket needs to reference in the respective project. This is to have any number of dependencies in thepackages.fsx
but only reference the test-specific subset among these for test projects.Definition direct dependency: A dependency that is declared in
packages.fsx
Definition indirect dependency: A dependency of a direct dependency. Indirect dependencies might change with future releases of direct dependencies (adding or removing indirect dependencies).
Both direct and indirect dependencies and their calculated versions will to be downloaded to
<packages.fsx location>/packages/
and saved topackages.lock
.My question is whether it's a good idea to restrict the dependencies that are allowed in the project-specific
packages
file to direct dependencies.Now on to the discussion, assuming there is no
packages.lock
(see below why this is a good idea):Restricting packages to direct dependencies
Pros
packages.fsx
, thus making them available.Cons
packages
file. I.e. both the direct and the indirect dependencies need to be put inpackages.fsx
.Allowing direct and indirect dependencies
Pros
packages.fsx
might become a bit shorter, listing only high-level direct dependencies.Cons
packages.fsx
to make the previously-indirect dependency a direct dependency.Why not having a lockfile sometimes is a good idea
In Ruby (with bundler) there is the notion that library developers should not check in their
Gemfile.lock
files (=packages.lock
). The reason is that reproducible builds are generally not that much important for libraries and that you rather want to know whether the library still works with the latest dependencies according to the version constrains in theGemfile
(=packages.fsx
).This makes it very easy to just rerun
bundle install
and your test suite (even in CI) from time to time without the need to change any files.I think for .NET libraries the same pattern may emerge, with services like https://gemnasium.com/ that check your libraries' dependencies weekly and notify you about (semver) breaking changes in your libraries' dependency set.
For applications, on the other hand, the situation is a bit different. For them you want reproducible builds, regardless of dependency updates (according to `packages.fsx´). This is where the lockfile comes into play. It records the fact that you proved your app works against a specific set of dependencies in specific versions. Using the lockfile enables you to recreate the same runtime environment over and over again.
You can read more about the way Ruby handles this here:
http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/
http://bundler.io/v1.3/rationale.html#checking-your-code-into-version-control
I hope I could get my point across. Looking forward to your feedback!
The text was updated successfully, but these errors were encountered: