![githubusercontent githubusercontent]()
本文介绍了如何使用自制软件降级Dart的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我在Mac上,并且通过运行从Dart 2.7.1升级到Dart 2.8I'm on a Mac and I upgraded to Dart 2.8 from Dart 2.7.1 by runningbrew upgrade dart如文档。但是,版本2.8对Aqueduct框架进行了一些重大更改,因此我想降级到Dart 2.7。 2。However, version 2.8 contains some breaking changes for the Aqueduct framework, so I want to downgrade to Dart 2.7.2.我尝试了brew install [email protected]但是得到了我也尝试了brew search dart但只有没有选择较低的选项2.x版本。There is no option to select a lower 2.x version.如何降级?推荐答案 运行 brew info dart 并找到公式链接,例如 来自: https://github.com/dart -lang / homebrew-dart / blob / master / dart.rb打开您的公式链接浏览器,它将带您进入主分支存储库页面open the formula link in your browser, it will take you to the master branch repo page 单击 Raw ,然后从浏览器的地址栏,例如 https://raw.githubusercontent.com/dart-lang/homebrew-dart/master/dart.rb (保存原始网址,您需要(在第5步中)。click "Raw" and take the raw url from your browser's address bar, for examplehttps://raw.githubusercontent.com/dart-lang/homebrew-dart/master/dart.rb(save the raw url, you will need it in step 5)使用浏览器返回回购页面,然后点击 t;历史记录go back with your browser to the repo page and click "History" 向下滚动直到看到您感兴趣的版本,例如 updated stable branch to修订版2.7.2 点击 将稳定分支更新到修订版2.7.2 。并从diffs页面顶部获取完整的提交ID(哈希),例如 fed6de080aef54c4f1c1df732424df37cd3e5a3e (保存完整的提交ID(哈希),您将需要在步骤3中使用它) 5)scroll down until you see the version you're interested in, for example "Updated stable branch to revision 2.7.2"click on "Updated stable branch to revision 2.7.2" and from the top of the diffs page take the full commit ID (hash) for example fed6de080aef54c4f1c1df732424df37cd3e5a3e(save the full commit ID (hash), you will need it in step 5)运行 brew卸载dartrun brew uninstall dart使用 brew install https://raw.githubusercontent.com/dart-lang/homebrew-dart/fed6de080aef54c4f1c1df732424df37cd3e5a3e/dart.rbinstall an older version of Dart withbrew install https://raw.githubusercontent.com/dart-lang/homebrew-dart/fed6de080aef54c4f1c1df732424df37cd3e5a3e/dart.rb 在上面的命令中,通过使用您在第2步中保存的URL并将 master 替换为单词来获得url。在步骤3中获得的提交ID(哈希) fed6de080aef54c4f1c1df732424df37cd3e5a3e 。 这篇关于如何使用自制软件降级Dart的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-31 06:49