Repository navigation
Support installing docc plugin via env var - #845
Merged
Merged
Conversation
This is a workaround for `swift package add-dependency` not working due to swift-subprocess pulling it in explicitly: ``` [swift-java] -> % swift package add-dependency https://github.com/swiftlang/swift-docc-plugin --from 1.1.0 error: unable to add dependency 'https://github.com/swiftlang/swift-docc-plugin' because it already exists in the list of dependencies ``` even though ``` -> % swift package generate-documentation error: Unknown subcommand or plugin name 'generate-documentation' Usage: swift package <options> <subcommand> ``` So this is a workaround to enable the plugin in this package
ktoso
force-pushed
the
wip-env-enable-plugin
branch
from
July 14, 2026 00:50
5f8f84c to
0e7f56b
Compare
Collaborator
Author
|
Related swiftpm issue swiftlang/swift-package-manager#10294 |
Collaborator
Author
|
Verified in earlier run |
iCharlesHu
pushed a commit
to swiftlang/swift-subprocess
that referenced
this pull request
Jul 14, 2026
Nowadays (as weird as it is) projects are not expected to have the dependency declared explicitly. It must be added ad-hoc or by the swift package index. Otherwise all kinds of tools break, including swiftlang/docs. It would be ideal that all projects can just add the plugin, but that's not the state of the world nowadays. Meanwhile I did workarounds in adopter projects to unbreak swiftlang/docs building with those added, more details here swiftlang/swift-java#845 cc @heckj
jakepetroules
added a commit
to swiftlang/swift-package-manager
that referenced
this pull request
Sep 14, 2026
Nowadays (as weird as it is) projects are not expected to have the dependency declared explicitly. It must be added ad-hoc or by the swift package index. Otherwise all kinds of tools break, including swiftlang/docs. It would be ideal that all projects can just add the plugin, but that's not the state of the world nowadays. Meanwhile I did workarounds in adopter projects to unbreak swiftlang/docs building with those added, more details here swiftlang/swift-java#845
Teemperor
pushed a commit
to Teemperor/swift-mono
that referenced
this pull request
Sep 14, 2026
=== swift-testing ======================================== Adjust `CustomTestStringConvertible` and `CustomIssueRepresentable` for Embedded Swift. (Issue/PR 1899) Adjusts the implementations of these two protocols to work in Embedded Swift. The former needs to explicitly access `description` instead of calling `String(describing:)` because that's implemented generically in Embedded Swift (and you can't open an existential there nor cast between generic types). The latter needs to hard-code the list of conforming types, but only for Embedded Swift. `CustomTestReflectable` is already unavailable in Embedded Swift. `CustomTestArgumentEncodable` will be hidden from Embedded Swift in its entirety in a future PR as it's not possible to implement it there. ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated. === swiftpm ============================================== Remove explicit swift-docc-plugin dependency Nowadays (as weird as it is) projects are not expected to have the dependency declared explicitly. It must be added ad-hoc or by the swift package index. Otherwise all kinds of tools break, including swiftlang/docs. It would be ideal that all projects can just add the plugin, but that's not the state of the world nowadays. Meanwhile I did workarounds in adopter projects to unbreak swiftlang/docs building with those added, more details here swiftlang/swift-java#845
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a workaround for
swift package add-dependencynot working due to swift-subprocess pulling it in explicitly:even though
So this is a workaround to enable the plugin in this package