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
When importing a module that has a similar name (in all but case) from a target of the same project, compilation frequently fails on OSX with: error: cannot load module 'naming' as 'Naming'
This seems to occur most frequently with a target that also has a dependency on another local target, for example:
On Linux, this compiles without issue. On Mac, it gives the error above - most of the time. Yesterday, repeatedly invoking swift build would produce the error maybe 50% of the time. Today it seems to happen every time. It seems there is some non-determinism involved.
If I comment out the naming target, the foobar target successfully builds. If I then uncomment naming and re-run swift build, that builds too. If I then invoke swift build again, however, I get the error again.
The above experiments were performed with Swift 4.0 and 4.0.3.
I can't confirm if this is fixed since 4.0.3, as when I tried the latest 4.1 or master snapshots, I just get Segmentation fault: 11 (this crash also occurs on Linux).
The text was updated successfully, but these errors were encountered:
It's definitely supposed to happen all the time. Starting on the package manager because I've never seen the swiftc-level regression test fail. Maybe there are symlinks involved?
Environment
Ubuntu 16.04 / High Sierra 10.13.1 + XCode 9.2
Additional Detail from JIRA
md5: c95996c6eaf19a9076cc2a79e5a3ebbd
Issue Description:
When importing a module that has a similar name (in all but case) from a target of the same project, compilation frequently fails on OSX with:
error: cannot load module 'naming' as 'Naming'
This seems to occur most frequently with a target that also has a dependency on another local target, for example:
Full example: https://github.com/djones6/NamingMain
On Linux, this compiles without issue. On Mac, it gives the error above - most of the time. Yesterday, repeatedly invoking
swift build
would produce the error maybe 50% of the time. Today it seems to happen every time. It seems there is some non-determinism involved.If I comment out the
naming
target, thefoobar
target successfully builds. If I then uncommentnaming
and re-runswift build
, that builds too. If I then invokeswift build
again, however, I get the error again.The above experiments were performed with Swift 4.0 and 4.0.3.
I can't confirm if this is fixed since 4.0.3, as when I tried the latest 4.1 or master snapshots, I just get
Segmentation fault: 11
(this crash also occurs on Linux).The text was updated successfully, but these errors were encountered: