You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(I am observing this with the package manager, but I imagine the issue is more widespread.)
Module names seem to support Unicode. But it is not consistent. Some names work just fine:
mkdir Εφ
cd Εφ
swift package init
swift test
But others break:
mkdir Εφαρμογή
cd Εφαρμογή
swift package init
swift test
The tests pass, but the module can only be imported with Εφαρμογη_, which does not match the manifest. In this case it seems to be triggered by a combining scalar.
On macOS everything is in NFD at this point, due to the original directory name. What if we try to work around it by changing the manifest entries to NFC so the tonos is not a separate scalar? ("Εφαρμογ\u{3AE}")
No dice; regardless of whether the import statement itself is in NFD or NFC, this happens:
$ swift test
[...]/Εφαρμογή/Tests/ΕφαρμογήTests/Εφαρμογη_Tests.swift:2:18: error: cannot load module 'Εφαρμογή' as 'Εφαρμογή'
@testable import Εφαρμογή
And looking inside the .build directory, I see internally inconsistent entries like this:
[...]/Εφαρμογή.build/Εφαρμογη_.swift.o
The text was updated successfully, but these errors were encountered:
SwiftPM folks, is SwiftPM doing some kind of normalization here? The compiler just complains when it sees non-identifier names, but SwiftPM seems to be substituting out characters…but incorrectly, since it's substituting an accent without the base.
Environment
macOS 10.14.5
Swift 5.0.1
Additional Detail from JIRA
md5: d668aab4b2e6d8d65bc46c1379051558
Issue Description:
(I am observing this with the package manager, but I imagine the issue is more widespread.)
Module names seem to support Unicode. But it is not consistent. Some names work just fine:
But others break:
The tests pass, but the module can only be imported with
Εφαρμογη_
, which does not match the manifest. In this case it seems to be triggered by a combining scalar.On macOS everything is in NFD at this point, due to the original directory name. What if we try to work around it by changing the manifest entries to NFC so the tonos is not a separate scalar? (
"Εφαρμογ\u{3AE}"
)No dice; regardless of whether the import statement itself is in NFD or NFC, this happens:
And looking inside the
.build
directory, I see internally inconsistent entries like this:[...]/Εφαρμογή.build/Εφαρμογη_.swift.o
The text was updated successfully, but these errors were encountered: