-
Notifications
You must be signed in to change notification settings - Fork 301
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
minimal DocC markdown to order Logger.Levels #225
Conversation
Motivation: When viewed in documentation generated by DocC, the enumeration levels are ordered alphabetically, removintg the implied ordering in the source. The written overview of the enum relies on that ordering to make sense. Modifications: Adding a single file that provides structure to Logging/Logger/Levels within DocC generated documentation. Result: When imported into a project that leverages Swift 5.6 (such as Vapor), the generated documentation for the levels provided by Logging/Logger/Levels are displayed in the order intended/expected by the documentation.
Can one of the admins verify this patch? |
11 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
@swift-server-bot test this please |
Motivation: Per DocC team, an updated version is required for the DocC changes to be picked up and reflected in generated dcumentation, even for upstream projects already using swift 5.6 or later. Modifications: Adding [email protected] with the swift version updated. Result: Hopefully, documentation updates in DocC generated content will be reflected.
@swift-server-bot test this please |
Heh seems Ci now has issues due to
on 5.6 builds -- so we may need to #if them out |
Motivation: To appease CI, added #if statements into generated LinuxMain content to handle conditional compilation with Swift 5.6 and later. Modifications: Added #if statements to test generating script and re-ran the script Result: CI will hopefully pass.
@swift-server-bot add to allowlist |
@swift-server-bot test this please |
@swift-server-bot test this please |
I'm looking into how to have all swift versions survive this -- will push this over the finish line, thanks for the PR @heckj ! |
@swift-server-bot test this please |
scripts/generate_linux_tests.rb
Outdated
@@ -71,6 +71,7 @@ def createExtensionFile(fileName, classes) | |||
file.write "\n" | |||
|
|||
for classArray in classes | |||
file.write "#if swift(<5.6)\n" |
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.
these set of changes seem redundant to me. can you provide more background on what issue these are solving?
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.
It's a swiftpm regression, I'm talking with Boris about it
Swift seems to be unable to compile these files anymore - seems to have regressed recently somewhere.
The error is:
error: emit-module command failed with exit code 1 (use -v to see invocation)[25/28] Emitting module swift_logPackageTests
/code/Tests/LinuxMain.swift:28:1: error: expressions are not allowed at the top level
XCTMain([
^
[26/28] Compiling swift_logPackageTests LinuxMain.swift
/code/Tests/LinuxMain.swift:28:1: error: expressions are not allowed at the top level
XCTMain([
^
error: fatalError
rdar://97297732
but LinuxMain exists
thanks for the contribution @heckj I am a bit surprised to see the formatting and test generation changes. what issue did you run into that triggered these changes? |
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.
lets try to find a simpler way to deal with the test generation issues and rollback the formatting changes.
Okey I think I managed to minimize the change and fix the LinuxMain issue with only flags passed to SwiftPM on 5.6+ Have a look folks, I think this'll be good; And we can fix the SwiftPM issue independently as well even on a linux only 5.6 release perhaps. |
Waiting this out a little bit while we investigate the LinuxMain issue to see if we can solve it more cleanly -- we'll take this over and merge once we have a plan here -- thanks for the PR @heckj ! |
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.
this looks much nicer now!
Okey we're clear here and we'll look into LinuxMain issues separately -- thank you @heckj ! |
Thanks! Appreciate all the help! |
minimal DocC markdown to order Logger.Levels
Motivation:
When viewed in documentation generated by DocC, the enumeration levels
are ordered alphabetically, removintg the implied ordering in the
source. The written overview of the enum relies on that ordering to make
sense.
Modifications:
Adding a single file that provides structure to Logging/Logger/Levels
within DocC generated documentation.
Result:
When imported into a project that leverages Swift 5.6 (such as Vapor),
the generated documentation for the levels provided by
Logging/Logger/Levels are displayed in the order intended/expected by
the documentation. Resolves #224.