I am trying to use dart hangouts_api and polymer at the same time and I get the following error:
Incompatible version constraints on browser:
- hangouts_api 0.3.0 depends on version >=0.9.0 <0.10.0
- polymer 0.15.1 depends on version >=0.10.0 <0.11.0
Mu pubspec.yaml file refers to the current version of each.
I cannot use anything but the lastest version of each as the suggested alternatives are years old. Is there a work around? To whom should I report this to (assuming it is a bug)?
Just create an issue in the hangouts_api GitHub repo and ask to bring dependencies up to date or even better, create a pull request.
As a workaround you can force a specific version by adding
dependency_overrides:
browser:">=0.10.0“
see also https://www.dartlang.org/tools/pub/dependencies.html#dependency-overrides
Related
Similar to how you get your apps version kCFBundleVersionKey how does one get the version of the package you are working in?
I don't think it's possible at the moment to get the value easily.
You can either read the Package.resolved file or you can set up a public constant where you would define the version of your library.
public let version = "0.0.1"
import MyLibrary
print(MyLibrary.version)
There isn't a standard way how to do this, every package could have a different constant (or not have it at all)
You can check package version rules in project package dependencies tab. Check screenshot below. Propably it would be sufficient for most use cases.
Edit: The context has changed, the question was to get the version of MyPackage I'm working on via code. There isn't any documented or recommended method as of now. Though this can be achieved by a hack through reading the Package.resolved file as mentioned by Malcolm.
I'm not deleting this answer for any future users who are looking for answer on how to get the exact latest version of a Package.
You can give the same major version number and give Update to latest package version option on Xcode. eg: If current version is 2.4.5 you just need to provide 2.0.0 and update. There is also an option to provide the exact version of swift package you need.
What is the correct semantic versioning change to make when updating a podspec for a new Swift version?
For example, I am currently updating my project to Swift 5.1 (and therefore Xcode 11). The changes to the source code are only Swift 5.1 tweaks like implicit returns from single-expression functions. The underlying API, functionality and iOS deployment target is not changing at all.
Typically, I would increment the PATCH version by 1, but I've honestly never been sure because of how https://semver.org/ describes what to increment:
Given a version number MAJOR.MINOR.PATCH, increment the:
MAJOR version when you make incompatible API changes,
MINOR version when you add functionality in a backwards compatible manner, and
PATCH version when you make backwards compatible bug fixes.
I'm not making API changes, adding new functionality or fixing any bugs, but I still need to change the version in my podspec.
I think this is an objective question, but the community can feel free to vote it down if not ;P
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.
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
I have made a project in xcode4.2 and when i opened it with xcode4.5 ,iOS 6 SDK it gives error 255 and the reason seems to be absence of libxml2.2.7.3.dylib.
What are my options is there any other substitute provided?
thanks
Xcode 4.5, or more precisely the iOS6 SDK (because the libraries available are dependent of the SDK, not the Xcode version) still has libxml2.2.dylib.
It is just probably not the version 2.2.7.3 but a newer, up-to-date 2.2.x.y version that is embedded in the SDK now.
You should generally not link your application with a specific version of libraries like that, but better with a generic version like libxml2.dylib or libxml2.2.dylib.
Generally libraries respect the semantic versionning, meaning that:
their major version change only when the API is not backward compatible with the previous major version,
the minor version change only when new methods are introduced in the API, but are still compatible with the previous API,
patch version means that some bug fixes have been made, but the API hasn't changed.
So if libxml respect this semantic versioning (and I guess is does, like quite every standard library), every version 2.2.x.y of libxml is API-compatible with any other 2.2.x.y version and will continue to work with your program. A hypothetic new version libxml2.2.x.z will simply fix bugs, but won't introduce any change in its API. And when a version of libxml2.3.x.y will arise, it will still be backward compatible with 2.1 and 2.2 too (just adding new features but not dropping the existing ones).
Thus, you can safely link your application with the generic library version libxml2.dylib, which will automatically point to the latest 2.x.y.z version available in the current SDK. Or link with libxml2.2.dylib which will point to the latest 2.2.x.y version (these are symbolic links to the latest versions, as all UNIX-like OSes use to do)
I think SDK for iOS6 just contains different version of libxml