简体   繁体   English

使用Mix强制更新包

[英]Forcing package update with Mix

When I use the following command 当我使用以下命令

mix deps.update --all

mix will use locally cached packages if the version of a package has not been changed in the mix.ex file. 如果在mix.ex文件中没有更改包的版本, mix将使用本地缓存的包。 So the question is, how can I force mix not to use the cached version and download it from the server instead? 所以问题是,如何强制mix不使用缓存版本而是从服务器下载? For example, if there were changes in the last version of some package and I want to pick those up, even if the version has not been bumped. 例如,如果某个软件包的最后一个版本发生了变化,我想选择那些软件包,即使版本没有被碰到。

First of a released Hex package can only be changed for up to 1 hour after it is initially created, after that it becomes immutable and wont ever change. 首先发布的Hex包只能在最初创建后最多1小时更改,之后它将变为不可变且永远不会更改。 In the future when Hex adds tooling for testing packages before release you will never be able to change a package that has been published. 将来,当Hex在发布之前添加用于测试包的工具时,您将永远无法更改已发布的包。

Hex does a conditional GET request to fetch a package if it's already cached. 如果包已经被缓存,Hex会执行一个条件GET请求来获取包。 If the package didn't change we use the cache, if it did change we fetch it again. 如果包没有改变,我们使用缓存,如果它确实改变了,我们再次获取它。 If you are unable to reach the Hex CDN it will automatically use the cached package if it's available. 如果您无法访问Hex CDN,它将自动使用缓存包(如果可用)。

Additionally any time you get or update packages Hex will download a registry of all released packages which includes a checksum that we use to verify against the package tarball so you will never be able to use an outdated packages. 此外,每当您获得或更新软件包时,Hex将下载所有已发布软件包的注册表,其中包含我们用于验证软件包tarball的校验和,因此您将永远无法使用过时的软件包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM