Is it possible to remove irrelevant restrictions from paket.lock? - f#

I have discovered that my paket.lock file contains a lot of things I don't care about, e.g.:
System.Memory (>= 4.5.3) - restriction: ||
(&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos))
(&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac))
(>= net46)
(>= uap10.1)
I don't want to think about monoandroid or wpa81 or uap10.1 and so on and it is hard to understand what is really going on there after I have recently got some dependency conflict. I want something neat e.g. like this.
I read some docs and tried the framework restriction thing in paket.dependencies: framework: netstandard20, netcoreapp30.
But it did not really change much after paket install. I have tried adding this to every group - to no avail as well. I tried running paket update and paket simplify, I tried to remove the lock file and to paket install everything again.
Am I doing something wrong, like not adding directions to paket.dependencies or running wrong paket command?
Or is it just the way things are?

These declarations in the paket.lock file aren't irrelevant. You're seeing this because the System.Memory package you're depending on, either directly or implicitly, has a lot of targets it can run on. Paket is resolving the package and correctly serializing the resolution rules. Should you do something like multi-target in the future, and one of those targets isn't supported for the package, you'll correctly get a package resolution failure. However, if you delete these, you'll likely end up with a runtime failure.

Related

Why do I have duplicate packages installed by Homebrew

A recent update (of cloog, I think) resulted in what look like duplicate entries listed by brew list:
...
gmp
gmp#4
...
isl
isl#0.12
...
What are these and why are they present? Can I get rid of them? Are they likely to cause any issues?
The # prefixed formula is old version formula, or "versioned formula".
For example, llvm on homebrew is 3.9.1, but llvm#3.7 is 3.7.1.
The package like this exists for one who wants to use the old version, or as a dependency for the another
versioned formula.
AFAIK versioned formula won't cause a problem.
You can get rid of one unless it is a dependency of something.

Getting Angular Dart and Paper elements together

I'm trying to put paper elements in my angularDart app, so I have put in my pubspec.yaml the following dependencies:
dependencies:
angular: ">=1.0.0 <2.0.0"
paper_elements: ">=0.5.0 <0.6.0"
And then when I try to pub upgrade I get the following:
Pub: Upgrade Dependencies: Incompatible version constraints on
html5lib:
- angular 1.0.0 depends on version >=0.10.0 =0.11.0 <0.13.0
I'd really like to use the 1.0.0 (at least) version of angular Dart, however I was wondering if there was a way to satisfy both libs' dependencies. (and how does someone get to know what the correct dependencies' versions are)
Note that I tried doing the same with Polymer and facing the same problem (with a different dependency), so a general way of working around this would help, instead of just giving version numbers.
Just use dependency overrides.
dependency_overrides:
html5lib: 0.12.0
There is no way to satisfy both when their constraints have no common set.
It's at your own risk when one of them doesn't work properly with the specified version.

When to use ~> in a Podfile

I'm slowly coming around to using CocoaPods.
I'm confused as to when I should use the ~> operator. Some libraries use it: https://github.com/AFNetworking/AFNetworking, some don't: https://github.com/jessesquires/JSQMessagesViewController.
The only reason I can think of when you should use the ~> operator is when you are concerned a major upgrade will break your system. Is this the main reason?
Or am I missing something obvious?
Yes... ~> will not upgrade to major version.
Look full (and good) explanation here: http://guides.cocoapods.org/using/the-podfile.html

Unable to find a suitable version for polymer

I'm installing and configuring Polymer and i get to this:
Unable to find a suitable version for polymer, please choose one:
1) polymer#master which resolved to ced408df76 and is required by core-component-page#a431519835, highlightjs-element#a2c5fc08d0, marked-element#761922b4a2
2) polymer#0.2.4 which resolved to 0.2.4 and is required by core-ajax#0.2.4, core-bind#0.2.4, core-collapse#0.2.4, core-doc-viewer#0.2.4, core-elements#0.2.4, core-firebase#0.2.4, core-icon#0.2.4, core-icons#0.2.4, core-iconset#0.2.4, core-iconset-svg#0.2.4, core-input#0.2.4, core-layout#0.2.4, core-layout-grid#0.2.4, core-layout-trbl#0.2.4, core-list#0.2.4, core-localstorage#0.2.4, core-media-query#0.2.4, core-menu-button#0.2.4, core-meta#0.2.4, core-overlay#0.2.4, core-range#0.2.4, core-selection#0.2.4, core-selector#0.2.4, core-theme-aware#0.2.4, core-tooltip#0.2.4, core-transition#0.2.4
3) polymer#~0.2.4 which resolved to 0.2.4 and is required by project
Prefix the choice with ! to persist it to bower.json
I'm still learning about and i dont know which one i should choose and why this problem happend. Can anyone explain me this tree options?
Thanks..
The recommended way to install Polymer 0.2.4 is through Bower. We’ve
chosen Bower because it removes the hassle of dependency management
when developing or consuming elements.
from http://www.polymer-project.org/docs/start/getting-the-code.html
I'd go with
2) polymer#0.2.4 which resolved to 0.2.4 and is required by
...
This happened because when bower went to install a version of polymer it was presented with three options and didnt know which one to choose from. Many packages have a stable release and a development version, which you want is up to yourself. You can usually check up the packages on github or there websites to find which package might suit you best

Configure AFNetworking-RACExtensions with CocoaPods

I’ve been trying to AFNetworking-RACExtensions by using CocoaPods, but it always shows this error:
[!] Unable to satisfy the following requirements:
- `ReactiveCocoa (= 2.1.8)` required by `Podfile`
- `ReactiveCocoa/no-arc` required by `ReactiveCocoa (2.1.8)`
- `ReactiveCocoa/Core` required by `ReactiveCocoa (2.1.8)`
- `ReactiveCocoa/no-arc` required by `ReactiveCocoa/Core (2.1.8)`
- `ReactiveCocoa (~> 2.1)` required by `ReactiveViewModel (0.1.1)`
- `ReactiveCocoa (~> 1.5.0)` required by `AFNetworking-RACExtensions (0.0.1)`
What can possible the the cause? Is it because AFNetworking-RACExtensions need AFNetworking 1.5 to work?
The issue here is that you need a version of ReativeCocoa that matches the semantic versioning required by ~> 1.5.0. So I believe that would include the highest version matching 1.5.x but not 1.6*. Regardless 2.* definitely isn't compatible with that. Since you're requiring 2.x other places you can not have both of these versions at once. This is something CocoaPods can't handle because of the nature of duplicate symbols in Objective-C. The only way to fix this would be to downgrade your 2.x version, although I assuming going down to before 2.0 would be difficult. Or the AFNetworking-RACExtensions upgrading to support ReactiveCocoa 2.x.

Resources