Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-15462] Regression: Swift 5.5 on Linux doesn't see extension on timeval_t #57767

Closed
swift-ci opened this issue Nov 9, 2021 · 1 comment
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Nov 9, 2021

Previous ID SR-15462
Radar None
Original Reporter helge (JIRA User)
Type Bug
Environment

First noticed in the GH Actions environment, but it also reproduces using the Swift in `helje5/arm64v8-swift-dev:5.5.1` (and presumably any Linux environment w/ Swift 5.5).

Additional Detail from JIRA
Votes 2
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 25d1f72b79525d584a6e5c6ed9f63d9d

relates to:

  • SR-15532 Compiler doesn't load public property declarations in another module under some conditions.

Issue Description:

I have a small package called `xsys` which wraps and re-exports Glibc/Darwin:

https://github.com/NozeIO/xsys

This works fine on Darwin in general, but starts to break when compiling the tests on Swift 5.5 (tried both, 5.5.0 and 5.5.1):

https://github.com/NozeIO/xsys/runs/4141154588?check_suite_focus=true

The extension is defined here:

https://github.com/NozeIO/xsys/blob/084e2ff0667dd43f0a31868aa40463b287d2d9df/Sources/xsys/timeval_any.swift#L76

E.g.:
```swift
extension timeval : timeval_any {

@inlinable
public static var now : timeval {
var now = timeval()
_ = gettimeofday(&now, nil)
return now
}
```

When compiling the tests, Swift doesn't see that anymore. I tried removing the protocol conformance, removing the inline, neither helps.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@mickeyl
Copy link

mickeyl commented Jun 9, 2023

Seems to be fixed with Swift 5.8.1:

mickey@pluto:~/Documents/late/misc/xsys$ swift build
Building for debugging...
[17/17] Compiling xsys misc.swift
Build complete! (5.52s)
mickey@pluto:~/Documents/late/misc/xsys$ swift test
Building for debugging...
[13/13] Linking xsysPackageTests.xctest
Build complete! (2.55s)
Test Suite 'All tests' started at 2023-06-09 13:55:18.899
Test Suite 'debug.xctest' started at 2023-06-09 13:55:18.900
Test Suite 'xsysTests' started at 2023-06-09 13:55:18.900
Test Case 'xsysTests.testTimevalT' started at 2023-06-09 13:55:18.901
Test Case 'xsysTests.testTimevalT' passed (0.001 seconds)
Test Case 'xsysTests.testTimevalTComponents' started at 2023-06-09 13:55:18.901
Test Case 'xsysTests.testTimevalTComponents' passed (0.0 seconds)
Test Suite 'xsysTests' passed at 2023-06-09 13:55:18.902
Executed 2 tests, with 0 failures (0 unexpected) in 0.001 (0.001) seconds
Test Suite 'debug.xctest' passed at 2023-06-09 13:55:18.902
Executed 2 tests, with 0 failures (0 unexpected) in 0.001 (0.001) seconds
Test Suite 'All tests' passed at 2023-06-09 13:55:18.902
         Executed 2 tests, with 0 failures (0 unexpected) in 0.001 (0.001) seco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

3 participants