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

Parameter Packs get messed up #36

Open
adam-rocska opened this issue Nov 5, 2023 · 2 comments
Open

Parameter Packs get messed up #36

adam-rocska opened this issue Nov 5, 2023 · 2 comments

Comments

@adam-rocska
Copy link
Collaborator

Swift 5.9 feature: https://github.com/apple/swift-evolution/blob/main/proposals/0393-parameter-packs.md
Also see its related release notes: https://www.swift.org/blog/swift-5.9-released/

Given a code as follows:

import Beton

extension Store {
  public static func composite<each Store>(
    _ stores: repeat each Store

the plugin removes the space between each Storable and repeat each Storable, yielding the following incorrect result:

import Beton

extension Store {
  public static func composite<eachStore>(
    _ stores: repeateachStore

The real swift-format tool from Apple doesn't do this. Tested both with the homebrew and the Swift Package Manager installed editions. Only the VSCode plugin does this.

@vknabel
Copy link
Owner

vknabel commented Dec 9, 2023

Huh, that's weird. In theory using the extension should have no impact on the quality of formatting. Eventually it picked up the wrong version of the formatted from an unexpected path?

@adam-rocska
Copy link
Collaborator Author

Doesn't seem so. I'm more than happy to share a screen recording or even share screens and poke around on Facetime.

I'd gladly even fix the bug if I would have any ideas 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants