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

Adopt the upcoming feature SE-0409 (access-level modifiers on import declarations) #1183

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import class Foundation.ProcessInfo

let swiftSettings: [SwiftSetting] = [
.unsafeFlags(["-Xfrontend", "-warn-long-expression-type-checking=1000"], .when(configuration: .debug)),

.enableUpcomingFeature("InternalImportsByDefault"), // SE-0409: https://github.com/swiftlang/swift-evolution/blob/main/proposals/0409-access-level-on-imports.md
]

let package = Package(
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftDocC/Benchmark/Benchmark.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation

/// A logger that runs benchmarks and stores the results.
public class Benchmark: Encodable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftDocC/Benchmark/BenchmarkResults.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation

/// The results of a single benchmark run.
public struct BenchmarkResults: Codable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftDocC/Benchmark/Metrics/Duration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation

extension Benchmark {
/// A duration metric in milliseconds.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftDocC/Benchmark/Metrics/OutputSize.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation

extension Benchmark {
/// Measures the total output size of a DocC archive.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation
import SymbolKit

/// A type that writes the auto-generated curation into documentation extension files.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftDocC/Checker/Checker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Markdown
public import Markdown

/**
A markup checker.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
import Markdown
public import Foundation
public import Markdown

/**
A document's abstract may only contain formatted text. Images and links are not allowed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
import Markdown
public import Foundation
public import Markdown

/**
A `Document` may only have one level-2 "Topics" heading at the top level, since it serves as structured data for a documentation bundle's hierarchy.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
import Markdown
public import Foundation
public import Markdown

/**
A document should have a single title, i.e. a single first-level heading.
Expand Down
4 changes: 2 additions & 2 deletions Sources/SwiftDocC/Checker/Checkers/MissingAbstract.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
import Markdown
public import Foundation
public import Markdown

/**
A document should have an abstract.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
import Markdown
public import Foundation
public import Markdown

/// Checks for non-inclusive language in documentation.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
import Markdown
public import Foundation
public import Markdown

public struct NonOverviewHeadingChecker: Checker {
public var overviewHeading: Heading?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
import Markdown
public import Foundation
public import Markdown

public struct SeeAlsoInTopicsHeadingChecker: Checker {
public var seeAlsoInTopicsHeadings: [Heading] = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation

/// A converter from documentation nodes to render nodes.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation

/// A converter from documentation nodes to render nodes.
public struct DocumentationNodeConverter {
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftDocC/Converter/RenderNode+Coding.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation

/// An environmental variable to control the output formatting of the encoded render JSON.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation

/// An object that modifies a render node by applying transformations to it.
open class RenderNodeTransformer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation

/// A thread-safe cache for encoded render references.
public typealias RenderReferenceCache = Synchronized<[String: (reference: Data, overrides: [VariantOverride])]>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

import Foundation
import SymbolKit
public import SymbolKit

/// A type that can be converted to a DocC symbol.
@available(*, deprecated, message: "This deprecated API will be removed after 6.2 is released")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation

public extension DocumentationServer {
/// Creates a server configured with default services.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation

public extension DocumentationServer {
/// A message that can be provided to a documentation service.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation

/// A server that provides documentation-related services.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation

/// Protocol for request-response based servers.
public protocol DocumentationServerProtocol {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

import SymbolKit
import Foundation
public import Foundation

/// A request to convert in-memory documentation.
public struct ConvertRequest: Codable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation

/// A response for a successful documentation conversion.
///
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftDocC/Indexing/Navigator/NavigatorIndex.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation
import Crypto

/// A protocol to provide data to be indexed.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftDocC/Indexing/Navigator/NavigatorItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation

/// Unpacks data as a `T` value
/// - Note: To save space and avoid padding the data, we unpack data without requiring alignment.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftDocC/Indexing/Navigator/NavigatorTree.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation

/// Defines an object that can be represented as raw Data and therefore serialized to/deserialized from disk.
public protocol Serializable: LMDBData, RawRepresentable where RawValue == Data {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation

/// The data associated with a documentation resource, for a specific trait collection.
public struct BundleData {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation

/// A container for a collection of data. Each data can have multiple variants.
struct DataAssetManager {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// The WebKitCommunicationBridge is only available on platforms that support WebKit.
#if canImport(WebKit)
import Foundation
import WebKit
public import WebKit

/// Provides bi-directional communication with a documentation renderer via JavaScript calls in a web view.
public struct WebKitCommunicationBridge: CommunicationBridge {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation
import SymbolKit

extension DocumentationContext {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import Foundation

#if canImport(os)
import os
package import os
#endif

package enum ConvertActionConverter {
Expand Down
6 changes: 3 additions & 3 deletions Sources/SwiftDocC/Infrastructure/Diagnostics/Diagnostic.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
import Markdown
import SymbolKit
public import Foundation
public import Markdown
public import SymbolKit

/// A diagnostic explains a problem or issue that needs the end-user's attention.
public struct Diagnostic {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation
import Markdown

/// Writes diagnostic messages to a text output stream.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation

/// A diagnostic consumer that writes detailed diagnostic information to a file.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
import Markdown
public import Foundation
public import Markdown

/**
A diagnostic note is a simple string message that should appear somewhere in a document.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Markdown
public import Markdown
import SymbolKit

/**
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftDocC/Infrastructure/DocumentationBundle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation

/// A collection of the build inputs for a unit of documentation.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation

/// A collection of functions to check if a file is one of the documentation bundle files types.
public enum DocumentationBundleFileTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Foundation
public import Foundation
import Markdown
import SymbolKit

Expand Down
Loading