This repository has been archived by the owner on Jun 1, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As described in #16, #25, and #35, running swift-doc in a GitHub Action produces strange results, with overly-long API symbol names. While I'd originally attributed my inability to reproduce these results to a macOS v. Linux difference, it turns out to have been a matter of debug v. release.
I verified this locally by running tests in release mode (with the small change of making the import of
SwiftDoc
non-@testable
):When building with a release configuration, the Swift compiler removes assertions. The problem with the current implementation is that we're doing something important in the assertion:
swift-doc/Sources/SwiftDoc/SourceFile.swift
Line 190 in 85b5872
Separating out the work from the test in 7f9680e fixed the underlying issue.
To prevent such behavioral differences from creeping up again in the future, I updated the CI action to test in release mode going forward with 7896787. Tests will run slower than before, but this will give us greater confidence in the results of the tests, since it matches the configuration of how
swift-doc
is built when runningmake install
.