Skip to content

Fix handling of multi-line XCConfig assignments #559

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

Merged
merged 1 commit into from
Jun 5, 2025

Conversation

neonichu
Copy link
Collaborator

@neonichu neonichu commented Jun 4, 2025

Originally only one line was tracked here (the end line effectively), but we also have to track the start line separately for correct multi-line ranges.

Originally only one line was tracked here (the end line effectively), but we also have to track the start line separately for correct multi-line ranges.
@neonichu
Copy link
Collaborator Author

neonichu commented Jun 4, 2025

@swift-ci please test

@@ -242,7 +242,7 @@ final class MacroConfigFileLoader: Sendable {
return MacroConfigFileParser(byteString: data, path: path, delegate: delegate)
}

mutating func foundMacroValueAssignment(_ macroName: String, conditions: [(param: String, pattern: String)], value: String, path: Path, line: Int, startColumn: Int, endColumn: Int, parser: MacroConfigFileParser) {
mutating func foundMacroValueAssignment(_ macroName: String, conditions: [(param: String, pattern: String)], value: String, path: Path, startLine: Int, endLine: Int, startColumn: Int, endColumn: Int, parser: MacroConfigFileParser) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could startLine: Int, endLine: Int, startColumn: Int, endColumn: Int be something like rhs: Range<SourceLocation>?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess yah, maybe in a future PR :)

@neonichu
Copy link
Collaborator Author

neonichu commented Jun 5, 2025

@swift-ci please test linux

@neonichu neonichu enabled auto-merge (squash) June 5, 2025 00:13
@neonichu neonichu merged commit b78e04a into main Jun 5, 2025
24 checks passed
@neonichu neonichu deleted the bbuegling/multiline-xcconfig-locations branch June 5, 2025 01:31
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

Successfully merging this pull request may close these issues.

2 participants