According to "pub --help" the "upgrade" command is used to:
Upgrade the current package's dependencies to latest versions.
However, I just had to run "pub upgrade" several times to reach the current latest versions of packages that my pubspec.yaml depends on. It seemed like each run upgraded only incrementally. What am I missing?
Specific example I observed was mustache: ">=0.1.5", which was first upgraded to 0.1.6 and on a second run to 0.1.7.
pub version: Pub 1.1.0-dev.5.11
It should upgrade all dependencies to the latest version available, or the latest version allowed in pubspec.yaml (see the Pub Package Manager docs).
But if it jumps only over one new version per upgrade, try to fill in the bug
I have never seen that behavior. It should go straight to the highest available (not-dev) release that fulfills your dependency constraints.
You can see this behaviour if a new version of your dependency lands between your 2 runs.
Looking at the versions of mustache (click on the Versions tab) you can see if a new version has landed during your test. It may explain what you observed.
Related
This error always happens whenever I add a new Package via Swift Package Manager in Xcode:
Cannot fetch library
I've already configured my GitHub Auth Token setting in Xcode and registered my GitHub account.
My macOS version is Monterey 12.1, my Xcode version is 13.1, my command-line tools are 13.1, and I'm using an M1 chipset Mac.
Configure Dependency Rule 📏
tl;dr
I encountered this issue today and managed to resolve the Package by changing the Dependency Rule from Branch -> master to Up to Next Major Version and checking their latest Release versions from GitHub.
Other Dependency Rules
We can also try changing from Branch to other rules depending on our application:
Up to Next Major Version: Useful for getting the latest major stable release.
Up to Next Minor Version: Useful for getting the very latest releases.
Range of Versions: Useful for resolving dependencies specific to a particular dependency chain (careful configuration).
Exact Version: Useful for pinning a version to a particular working release, or fork.
Commit: Useful for pinning a Package to a commit rather than a release version.
Xcode SPM "Add Package" prompt
I tried to simulate your problem, Xcode and command-line version are the same. I was able to add SnapKit into my project without problems. Try this workaround:
Project -> Package Dependencies -> + -> paste the link: https://github.com/SnapKit/SnapKit -> Dependency rule set to Up To Next Major -> Add Package.
It should add a new package. Currently in version 5.0.1 If you have still a problem, just click Add Anyway, build the project and send a screenshot of the error.
I want to use the stable release of the sdk, which should be 2.2.0, but when I in the console check the version with the command "dart --version", it says I am running "Dart VM version: 2.1.0".
I have tried to upgrade via choco, and it says that I already have 2.2.0 installed.
Do I have multiple versions av Dart installed and can switch between them?
If so, can I set a default version?
I'll just mark this as answered with the comment of jamsdlin, as it was the correct answer for me.
When you run dart, you'll run whichever dart binary is found first in your search PATH. You have multiple versions installed. Uninstall the old version or modify PATH so that the location for 2.2.0 occurs first.
I wanted to give the latest Dart Polymer lib a spin, so I updated the pubspec file and ran a pub install. However, the install fails with the following message:
Pub install failed, [1] Resolving dependencies.........
Package polymer requires SDK version >=0.8.1+1 but the current SDK is
0.7.6+4.r28108
Is it somehow possible to use the latest Polymer version via pubspec, or do I need to build the SDK myself from the sources?
https://www.dartlang.org/tools/editor/ has links to the bleeding edge, continuous build DartEditor
https://storage.googleapis.com/dart-editor-archive-continuous/latest/darteditor-win32-32.zip
https://storage.googleapis.com/dart-editor-archive-continuous/latest/darteditor-win32-64.zip
As of today, you should be able to upgrade 0.8.1.2 if you go to Help > About Dart Editor.
It seems pretty common that the libraries update a day or two before the SDK, so normally when I run into this problem I put in the pubspec something like the following until I can update the SDK:
dependencies:
polymer: "< 8.0.0"
I need to upgrade my application which is using Cordova 1.8 version to Cordova 2.0 version. I followed the steps mentioned in the http://cordova.apache.org/docs/en/2.8.0/guide_upgrading_ios_index.md.html. My application's running for 1.9 but when am trying to upgrade it to 2.0 version am not able to find 'Preprocessor Macro' in build setting.
Also I am not able to find 'CordovaLib' folder, but in the 10th step they have mentioned related to PreprocessorMacro which am not able to find.
As you main motivation seems to be up to date with the last version of Cordova, I would recommend to create a new clean project with Cordova 2.8 and import your html files in the www folder.
Upgrading version by version is painful and you will not get any benefits from it. However, you might not get any performance improvement but you will get a better support from the community.
I am using Xcode 4.2.1 and I have this problem running an existing application on the iOS simulator:
svn: The path '.' appears to be part of a Subversion 1.7 or greater
working copy. Please upgrade your Subversion client to use this
working copy.
/Users/me/Library/Developer/Xcode/DerivedData/myproject-dxfzldckuqdmlrghowwkdrbgoigy/Build /Intermediates/myproject.build/Debug-iphonesimulator/MyProject.build/Script-9567AEA113C59633000AA291.sh: No Subversion revision found at /Users/me/Library/Developer/Xcode/DerivedData/myproject-dxfzldckuqdmlrghowwkdrbgoigy/Build/Intermediates/myproject.build/Debug-iphonesimulator/MyProject.build/Script-9567AEA113C59633000AA291.sh line 32.
Building revision
Command /bin/sh failed with exit code 1
I have a Subversion server 1.7.1 installed and also on the client side I upgraded to 1.7.1.
I did a svn upgrade and then I get this error in Xcode.
If I repeat the svn upgrade on the terminal I get the message Can't upgrade '...' as it is not a pre-1.7 working copy directory.
So what is wrong? How an I solve the problem?
Xcode doesn't yet support SVN 1.7. Only 1.6 is supported. In order to fix your problem, you'll need to switch to using an SVN 1.6 compatible working copy.
Since SVN 1.7 client is unable to work with 1.6 working copies at all, you'll need to remove SVN 1.7.x from your client and revert to 1.6. (Or perhaps just adjust your PATH so the SVN 1.6 tools are first.) Once 1.6 is back, delete or move aside your existing working copy and check out a fresh copy with SVN 1.6. Now Xcode should be able to work with your working copy.
Note that you can freely use SVN 1.6 client with an SVN 1.7 server. Some of the newer features won't be available, but it will work. There's no need to downgrade the server or your server-side repositories.
Keep an eye on the Xcode release notes in updates as I'm sure Apple will note when Xcode is capable of using SVN 1.7. When a 1.7 compatible release of Xcode becomes available, it should then be safe to upgrade your client to 1.7 and migrate your working copy again.
There is a post that appears to imply that you can fool XCode into using svn 1.7 client by changing your PATH and setting up a couple of soft links in strategic places. Unfortunately, the post is in Chinese. Fortunately, Google translate and the presence of UNIX commands make it possible to decrypt what the post is saying. I will try it in the next few days, and update the answer if anything useful comes out of this exercise.
EDIT: I tried the steps from the post, and it worked. Here is what I did:
Downloaded and installed svn client 1.7.2 into /opt/subversion
Added /opt/subversion/bin to my PATH in .bash_profile
Created a backup directory /Developer/usr/bin/orig.svn
Moved /Developer/usr/bin/svn* to /Developer/usr/bin/orig.svn
Ran ln -s /opt/subversion/bin/svn* /Developer/usr/bin/
After that I re-started XCode, went to Organizer, and was able to attach a working copy of a checkout created with svn 1.7.2 client. Organizer showed a green dot next to the repository, displayed a list of revisions, etc., so at this point I believe that the trick has worked.
You can download and install a binary package from http://www.wandisco.com/subversion/download#osx
The package will install to /opt/subversion while the xcode version of SVN is installed in /usr/bin. If you prepend /opt/subversion/bin to your path variable, it will be chosen instead of the xcode version.
If you don't want to mess with your path, you can just alias one version or the other. man alias for details.