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-12521] swift-format 5.2 branch fails with error "Too many unresolved delmiter token lengths" #331

Closed
swift-ci opened this issue Apr 5, 2020 · 3 comments
Labels
bug Something isn't working swift-format

Comments

@swift-ci
Copy link

swift-ci commented Apr 5, 2020

Previous ID SR-12521
Radar rdar://problem/62201696
Original Reporter killectro (JIRA User)
Type Bug
Environment

Xcode 11.4

Swift 5.2

Branch: `swift-5.2-branch`

Commit SHA: `1fda39893d3652a9a3f1673565a227f843d59f3c`

Additional Detail from JIRA
Votes 0
Component/s swift-format
Labels Bug
Assignee None
Priority Medium

md5: 1363f6c20f83c269551863c5a4f54343

Issue Description:

I was curious about the current state of the project so I decided to clone it and run it on my work codebase.

Running the swift-format 5.2 branch fails with error "Too many unresolved delmiter token lengths" when run on my current project. I was able to narrow it down to the following minimal example:

Broken:

class Foo {
    init(bar: Int) {}
}

Working:

class Foo {
    init() {}
}

I dug through the swift-format source a little bit but wasn't able to figure out the root of the problem since I am pretty unfamiliar with the structure of how it works.

Bonus bug, delimiter is spelled incorrectly in the error message!

.swift-format:

{
  "maximumBlankLines" : 1,
  "lineLength" : 100,
  "lineBreakAroundMultilineExpressionChainComponents" : true,
  "tabWidth" : 4,
  "prioritizeKeepingFunctionOutputTogether" : true,
  "indentConditionalCompilationBlocks" : true,
  "indentation" : {
    "spaces" : 4
  },
  "respectsExistingLineBreaks" : true,
  "lineBreakBeforeEachArgument" : true
}
@beccadax
Copy link

@swift-ci create

@rintaro
Copy link
Mannequin

rintaro mannequin commented May 6, 2020

cc: @allevato

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 9, 2022
@allevato
Copy link
Collaborator

The example above passes with the latest formatter, so this appears to have been fixed.

@allevato allevato closed this as not planned Won't fix, can't repro, duplicate, stale Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working swift-format
Projects
None yet
Development

No branches or pull requests

3 participants