Skip to content
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

Add * support for @Available directive #969

Open
anferbui opened this issue Jun 28, 2024 · 2 comments
Open

Add * support for @Available directive #969

anferbui opened this issue Jun 28, 2024 · 2 comments
Labels
enhancement Improvements or enhancements to existing functionality

Comments

@anferbui
Copy link
Contributor

anferbui commented Jun 28, 2024

Feature Name

Support platform name * in @Available directive

Description

We've added support for introduced and deprecated for the @Available directive in #440 and #441.

We should also add support for * as a value for the platform name, as currently it's not supported:
https://github.com/apple/swift-docc/blob/f019ab8e2e0370d8f95921d4b8f1f7309c4eedbc/Sources/SwiftDocC/Semantics/Metadata/Availability.swift#L66-L69

This would potentially be used like:

@Available(*, introduced: "1.0")

Motivation

We should add support for * as a platform name to better reflect that a large number of packages work on Linux and Windows and anywhere else where Swift is supported.

More context here:
#851 (comment)

Importance

The @Available directive is missing some functionality until we implement this feature.

Alternatives Considered

No response

@anferbui anferbui added the enhancement Improvements or enhancements to existing functionality label Jun 28, 2024
@mustiikhalil
Copy link
Contributor

Hej, I would love to complete the work I started at #441 however I would also love to know the specs that are required for this feature to be viable. Since from my understanding the team working on DocC hasn't reached to an agreement on how its supposed to work and how its represented within the docs

@sofiaromorales
Copy link
Contributor

Hi @mustiikhalil

I would also love to know the specs that are required for this feature to be viable.

The specs for this are still not defined, we have hade some discussion about it here https://forums.swift.org/t/documentation-workgroup-meeting-june-3rd-2024/72160/5 but nothing else has been decided since then.

As a first step this needs to be discussed in the forums so the community can agree on which is the best solution, until then there's no implementation that can be done.

If you are interested in kicking off the conversation by pitching a proposal in the forums, I could review a draft of the pitch before posting it, or you could bring this topic into the documentation workgroup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements or enhancements to existing functionality
Projects
None yet
Development

No branches or pull requests

3 participants