Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

SourceFile Symbol Producing Incorrect Name on Linux #16

Closed
mattt opened this issue Feb 13, 2020 · 1 comment
Closed

SourceFile Symbol Producing Incorrect Name on Linux #16

mattt opened this issue Feb 13, 2020 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@mattt
Copy link
Contributor

mattt commented Feb 13, 2020

When running the swift-doc GitHub action on Sources/SwiftDoc, the resulting documentation for SourceFile has the name "Contextual.Symbol.Extension.CompilationCondition.SourceFile".

Contextual.Symbol.Extension.CompilationCondition.SourceFile

Running this locally on macOS, I'm unable to reproduce this behavior.

This long name is a consequence of the SourceFile declaration following declarations relating to the Contextual protocol.

public protocol Contextual {}
extension Symbol: Contextual {}
extension Extension: Contextual {}
extension CompilationCondition: Contextual {}
// MARK: -
public struct SourceFile: Hashable, Codable {

This should be handled by visitPost, which pops the stack of contexts after visiting a contextual node:

mutating func visitPost(_ node: ExtensionDeclSyntax) {
assert(pop() is Extension)
}

However, these delegate methods don't appear to be called on Linux for some reason.

@mattt mattt added this to the 1.0.0 milestone Apr 1, 2020
@mattt mattt added the bug Something isn't working label Apr 1, 2020
@mattt
Copy link
Contributor Author

mattt commented Apr 5, 2020

As we can see, this was fixed by #51.

@mattt mattt closed this as completed Apr 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant