什么是Swift 4.1.50? [英] What is Swift 4.1.50?

查看:106
本文介绍了什么是Swift 4.1.50?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Xcode 10 beta,并且在编译时检查了将 Swift语言版本设置为 Swift 4 在其构建设置"中报告为 Swift 4.1.50 (beta 2、3和4进行了此操作;我没有机会测试beta 1).至少可以这样说,这让我印象深刻. Xcode的当前AppStore版本Xcode 9.4.1报告其版本为 Swift 4.1.2 .

I'm playing around with the Xcode 10 beta, and I noticed while doing compile-time checks of the Swift version number that projects with the Swift Language Version set to Swift 4 in their Build Settings are reporting as Swift 4.1.50 (betas 2, 3, and 4 do this; I didn't get a chance to test beta 1). This strikes me as... bizarre, to say the least. The current AppStore version of Xcode, Xcode 9.4.1, reports its version as Swift 4.1.2.

所以... Swift 4.1.3到4.1.49发生了什么?还是我应该记录的一个bug?还是50位有意义?

So... What happened to Swift 4.1.3 through 4.1.49? Or is this a bug that I should file? Or is the 50 significant in some way?

您可以使用我的测试文件进行自己的测试, Swift版本检查器

You can test this yourself with my test file, Swift Version Checker

推荐答案

根据Swift错误跟踪器上的Jordan Rose:

According to Jordan Rose on the Swift bug tracker:

这是我们可以提出的最差的答案,因为如果其中一个存在严重的安全漏洞,我们可能还会发布更多的4.1.x版本. (这已经发生过.)我们需要的版本号必须大于任何现有的4.1版本,但仍小于4.2.

This is the least bad answer we could come up with, given that we may still release more 4.1.x versions if there's, say, a bad security vulnerability in one of them. (This has happened before.) We needed a version number that was greater than any existing 4.1 version, but still less than 4.2.

我们确实考虑了其他想法,但这是我们为了最大程度地兼容而采用的想法.感谢SE-0212,我们至少将来不会有这个问题.

We did consider other ideas, but this is the one we went with for maximum compatibility. We at least won't have this problem in the future thanks to SE-0212.

因此,我从中得到的是,将来某个时候仍然可能必须有一个实际的4.1版本,但这只是4.1.2之上的一个安全补丁,因此逻辑上的数字应该是4.1. 3.同时,Swift 4.2编译器可以消化的伪4.1 Swift需要自己的数字,这也反映出它是4.1的方言,其结论是4.1.50,与4.1.2相比,它足够安全,可以容纳尽可能多的数字.他们想要的安全补丁.

So, what I take from this is that there might still have to be an actual 4.1 release sometime in the future, but that would just be a security patch atop 4.1.2, so the logical number for that would be 4.1.3. Meanwhile, the pseudo-4.1 Swift that the Swift 4.2 compiler can digest needs its own number that also reflects it's a dialect of 4.1, and their conclusion was 4.1.50, which is safely far enough away from 4.1.2 to allow for as many security patches as they want.

这篇关于什么是Swift 4.1.50?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆