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

Cleanup all warnings in 5.9 build #1125

Open
ktoso opened this issue Jul 3, 2023 · 7 comments
Open

Cleanup all warnings in 5.9 build #1125

ktoso opened this issue Jul 3, 2023 · 7 comments
Assignees
Labels
1 - triaged Ticket makes sense and is well defined, ready to be worked on 2 - pick next If looking for work, pick this ticket :-) help wanted Great tickets to get started contributing!
Milestone

Comments

@ktoso
Copy link
Member

ktoso commented Jul 3, 2023

We have a lot of self induced "deprecation warnings" because we use the runtime that people should not be touching.

  • We should probably remove a bunch of those deprecations because they are not types the public API exposes and we just have the noise to suffer through it.
  • We should consistently remove those deprecated "actor ref" APIs
  • We should address new warnings that appear in the 5.9 build
@ktoso ktoso self-assigned this Jul 3, 2023
@ktoso ktoso added this to the 1.0.x milestone Jul 3, 2023
@ktoso
Copy link
Member Author

ktoso commented Jul 3, 2023

There's a lot of these annoying ones:

/Users/ktoso/code/swift-distributed-actors/Sources/DistributedCluster/ClusterSystem.swift:833:38: warning: conformance of 'Never' to 'Encodable' is only available in macOS 14.0 or newer
        guard let selector = context.selectorSegments.first else {
                                     ^
/Users/ktoso/code/swift-distributed-actors/Sources/DistributedCluster/ClusterSystem.swift:833:38: note: add 'if #available' version check
        guard let selector = context.selectorSegments.first else {
                                     ^
/Users/ktoso/code/swift-distributed-actors/Sources/DistributedCluster/ClusterSystem.swift:832:10: note: add @available attribute to enclosing instance method
    func _resolveUntyped(context: _ResolveContext<Never>) -> _AddressableActorRef {
         ^

due to Never gaining a Codable conformance as well

@ktoso ktoso changed the title Must cleanup amount of warnings in 5.9 build Cleanup all warnings in 5.9 build Jul 3, 2023
@ktoso ktoso added help wanted Great tickets to get started contributing! 1 - triaged Ticket makes sense and is well defined, ready to be worked on 2 - pick next If looking for work, pick this ticket :-) labels Jul 3, 2023
@Garfeild
Copy link
Contributor

Hey @ktoso! What would be the best strategy to address Never warnings? I can think about two solutions:

  • Bump target version to macOS 14
  • Add macOS 13 specific extension that adds conformance?

@ktoso
Copy link
Member Author

ktoso commented Jun 27, 2024

Tbh I think we can bump the platform requirement, would you want to do that? :)

@Garfeild
Copy link
Contributor

Yeah, I would like to do that with some of other warnings as well. 🙂

Garfeild added a commit to Garfeild/swift-distributed-actors that referenced this issue Jul 3, 2024
**Motivation:**

Currently, project contains quite amount of shadowed generics warnings.
All this warnings will become errors with Swift 6.

**Modifications:**

Each warning occurency is updated to use slightly different type
parameters name.

**Result:**

- Partially addresses apple#1125
@Garfeild
Copy link
Contributor

FYI, I have opened one PR and have another one pending 😉

@Garfeild
Copy link
Contributor

@ktoso sorry for the ping, but could you take a look on it when you have spare time? 😇 #1158

@ktoso
Copy link
Member Author

ktoso commented Jul 18, 2024

Thanks for the ping, I'll give it a look

ktoso added a commit that referenced this issue Oct 16, 2024
* chore: bump minimal macOS version

* fix: resolve Swift 6 warnings - shadowing generics

**Motivation:**

Currently, project contains quite amount of shadowed generics warnings.
All this warnings will become errors with Swift 6.

**Modifications:**

Each warning occurency is updated to use slightly different type
parameters name.

**Result:**

- Partially addresses #1125

* fix: removing duplicated function

* fix: non-throwing closure in rethrow func

* fix: Swift Backtrace removal

* fix: providing default value in case of optional

* fix: using fulfillment in async tests

* fix: removing convenience keyword from Actor init

* fix: removing await keyword

* fix: remove duplicated entry in dict

* fix: remove non-required keyword in import

* fix: remove non-required await keyword in tests

* fix: use removeAll() to mute warning

* fix: addressing warnings with vars

* Unused vars are replaced with '_'
* Not mutated vars are updated to be 'let'

* update base swift version in images

* formatting

---------

Co-authored-by: Konrad `ktoso` Malawski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - triaged Ticket makes sense and is well defined, ready to be worked on 2 - pick next If looking for work, pick this ticket :-) help wanted Great tickets to get started contributing!
Projects
None yet
Development

No branches or pull requests

2 participants