gpt4 book ai didi

dart - pubspec.lock和pubspec.yaml之间的区别

转载 作者:行者123 更新时间:2023-12-03 03:49:59 25 4
gpt4 key购买 nike

pubspec.yaml和pubspec.lock有什么区别?两者都持有依赖版本。

最佳答案

The first time you get a new dependency for your package, pub downloads the latest version of it that’s compatible with your other dependencies. It then locks your package to always use that version by creating a lockfile. This is a file named pubspec.lock that pub creates and stores next to your pubspec. It lists the specific versions of each dependency (immediate and transitive) that your package uses.


source
pubspec.yaml中,只有包和版本需要使用。在pubspec.lock中,还有您需要的软件包和版本,以及您使用的每个软件包。

关于dart - pubspec.lock和pubspec.yaml之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63794639/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com