8000 GitHub · Where software is built
[go: up one dir, main page]

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
@mattt

Description

@mattt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0