apple / swift-log

A Logging API for Swift
https://apple.github.io/swift-log/
Apache License 2.0
3.48k stars 285 forks source link

minimal DocC markdown to order Logger.Levels #225

Closed heckj closed 2 years ago

heckj commented 2 years ago

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.

swift-server-bot commented 2 years ago

Can one of the admins verify this patch?

swift-server-bot commented 2 years ago

Can one of the admins verify this patch?

swift-server-bot commented 2 years ago

Can one of the admins verify this patch?

swift-server-bot commented 2 years ago

Can one of the admins verify this patch?

swift-server-bot commented 2 years ago

Can one of the admins verify this patch?

swift-server-bot commented 2 years ago

Can one of the admins verify this patch?

swift-server-bot commented 2 years ago

Can one of the admins verify this patch?

swift-server-bot commented 2 years ago

Can one of the admins verify this patch?

swift-server-bot commented 2 years ago

Can one of the admins verify this patch?

swift-server-bot commented 2 years ago

Can one of the admins verify this patch?

swift-server-bot commented 2 years ago

Can one of the admins verify this patch?

swift-server-bot commented 2 years ago

Can one of the admins verify this patch?

ktoso commented 2 years ago

@swift-server-bot test this please

ktoso commented 2 years ago

Cool, thanks! We worked through this and sadly needed to add a new Package-swift5.6.swift so docc can actually find the docc files, but it works well now:

Screenshot 2022-07-20 at 9 06 24

ktoso commented 2 years ago

@swift-server-bot test this please

ktoso commented 2 years ago

Heh seems Ci now has issues due to

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

on 5.6 builds -- so we may need to #if them out

ktoso commented 2 years ago

@swift-server-bot add to allowlist

ktoso commented 2 years ago

@swift-server-bot test this please

ktoso commented 2 years ago

@swift-server-bot test this please

ktoso commented 2 years ago

I'm looking into how to have all swift versions survive this -- will push this over the finish line, thanks for the PR @heckj !

ktoso commented 2 years ago

@swift-server-bot test this please

tomerd commented 2 years ago

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?

ktoso commented 2 years ago

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.

ktoso commented 2 years ago

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 !

ktoso commented 2 years ago

Okey we're clear here and we'll look into LinuxMain issues separately -- thank you @heckj !

heckj commented 2 years ago

Thanks! Appreciate all the help!