-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Fix up the userdocs index #85875
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
base: main
Are you sure you want to change the base?
Fix up the userdocs index #85875
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| # Dynamic Exclusivity (Experimental Diagnostics) | ||
| # Dynamic exclusivity (DynamicExclusivity) | ||
|
|
||
| TODO explain | ||
| Experimental |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| # Semantic Copies (Experimental Diagnostics) | ||
| # Semantic copies (SemanticCopies) | ||
|
|
||
| TODO explain | ||
| Experimental |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,7 +66,7 @@ let topicsHeader = "\n\n## Topics\n" | |
| let swiftIncludeDir = "include/swift" | ||
|
|
||
| let groupsFileName = "\(swiftIncludeDir)/AST/DiagnosticGroups.def" | ||
| let groupRegex = /GROUP\((?<name>[a-zA-Z]+), "(?<file>.+)"\)/ | ||
| let groupRegex = /GROUP\((?<name>[a-zA-Z]+),[^,]+,"(?<file>.+)"\)/ | ||
|
|
||
| let featuresFileName = "\(swiftIncludeDir)/Basic/Features.def" | ||
| let featuresRegex = /UPCOMING_FEATURE\((?<name>[a-zA-Z]+), .+\)/ | ||
|
|
@@ -95,17 +95,17 @@ do { | |
| } | ||
|
|
||
| func generateIndex() throws { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is just moving all the computation that generates errors to before we write so that we don't do any partial writes |
||
| let groupsWithWarnings = try groupNamesWithWarnings() | ||
| let docs = try retrieveDocs(groupsWithWarnings).sorted { a, b in | ||
| return a.title < b.title | ||
| } | ||
|
|
||
| let groupsHandle = try createIndex(name: groupsDocFileName, header: groupsHeader) | ||
| defer { try? groupsHandle.close() } | ||
|
|
||
| let featuresHandle = try createIndex(name: featuresDocFileName, header: featuresHeader) | ||
| defer { try? featuresHandle.close() } | ||
|
|
||
| let groupsWithWarnings = try groupNamesWithWarnings() | ||
| let docs = try retrieveDocs(groupsWithWarnings).sorted { a, b in | ||
| return a.title < b.title | ||
| } | ||
|
|
||
| try groupsHandle.write(contentsOf: "\n\n## Groups with warnings\n".data(using: .utf8)!) | ||
| for doc in docs where doc.kind == .groupWithWarnings { | ||
| let ref = "- <doc:\(doc.name.dropLast(3))>\n" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -138,6 +138,9 @@ config.swift_stdlib_enable_objc_interop = "@SWIFT_STDLIB_ENABLE_OBJC_INTEROP@" = | |
| # Configured in DarwinSDKs.cmake | ||
| config.freestanding_sdk_name = "@SWIFT_SDK_FREESTANDING_LIB_SUBDIR@" | ||
|
|
||
| if '@SWIFT_BUILD_SWIFT_SYNTAX@' == 'TRUE': | ||
| config.available_features.add('swift_swift_parser') | ||
|
|
||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @xedin for noticing this! |
||
| config.swift_sdks = "@SWIFT_SDKS@".split(";") | ||
|
|
||
| # Let the main config do the real work. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Format of each group line was completely changed a while back