From 24b74bc0a94b773b9f4d40961b45d4fca236a66d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helge=20He=C3=9F?= Date: Tue, 6 Jul 2021 14:08:53 +0200 Subject: [PATCH 1/5] Update README.md --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index dc7b9b5..bb82ed3 100644 --- a/README.md +++ b/README.md @@ -11,12 +11,11 @@ Blog entry on the topic: [DocC 📚 Archived and Analyzed](https://www.alwaysrig ### Status -2021-07-02: The module can import all documents created in the +The module can import all documents created in the [SlothCreator](https://developer.apple.com/documentation/xcode/slothcreator_building_docc_documentation_in_xcode) example. -It should be pretty complete, but specifically lacks testing with Objective-C -documentation. +It should be pretty complete. If you find an issue (usually signalled by an assertion or fatalError), please [*let us know*](https://github.com/DoccZz/DocCArchive/issues), @@ -24,8 +23,7 @@ we'll fix missing cases ASAP (PRs are welcome too). TODO: - [ ] Add DocC documentation! 🤦‍♀️ -- [ ] ~~Test with Objective-C documentation.~~ (looks like ObjC is unsupported by DocC?) -- [ ] Add a testsuite (existing one not added for sizing concerns). +- [x] Add a testsuite (existing one not added for sizing concerns). ### Usage in a Swift Package From ebb56fbb6ca325bddb94044acc32d3502a4b6925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helge=20He=C3=9F?= Date: Tue, 6 Jul 2021 14:20:41 +0200 Subject: [PATCH 2/5] Update swift.yml --- .github/workflows/swift.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 68f627b..d89bf39 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -31,7 +31,7 @@ jobs: - name: Select latest available Xcode uses: maxim-lobanov/setup-xcode@v1.2.1 with: - xcode-version: 12.2 + xcode-version: 13 - name: Checkout Repository uses: actions/checkout@v2 - name: Build Swift Debug Package From e5c19a8aa9bb7c2c1d0d57828583d28efc55ea2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helge=20He=C3=9F?= Date: Tue, 6 Jul 2021 14:23:28 +0200 Subject: [PATCH 3/5] Revert "Update swift.yml" This reverts commit ebb56fbb6ca325bddb94044acc32d3502a4b6925. --- .github/workflows/swift.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index d89bf39..68f627b 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -31,7 +31,7 @@ jobs: - name: Select latest available Xcode uses: maxim-lobanov/setup-xcode@v1.2.1 with: - xcode-version: 13 + xcode-version: 12.2 - name: Checkout Repository uses: actions/checkout@v2 - name: Build Swift Debug Package From 3f883228b829d074d1642284e3aea0efaae81f23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helge=20He=C3=9F?= Date: Mon, 19 Jul 2021 22:14:32 +0200 Subject: [PATCH 4/5] Make `documentVersion` optional Apparently not contained in all documents, but I think it is always 0 anywayz. --- Sources/DocCArchive/Schema_0_1/Document.swift | 4 +- .../DocumentDecodingTests.swift | 19 ++++++++ Tests/DocCArchiveTests/Fixtures.swift | 5 +++ .../DocCArchiveTests/Fixtures/Issue7Fail.json | 45 +++++++++++++++++++ 4 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 Tests/DocCArchiveTests/Fixtures/Issue7Fail.json diff --git a/Sources/DocCArchive/Schema_0_1/Document.swift b/Sources/DocCArchive/Schema_0_1/Document.swift index 4d186e9..50a4132 100644 --- a/Sources/DocCArchive/Schema_0_1/Document.swift +++ b/Sources/DocCArchive/Schema_0_1/Document.swift @@ -64,7 +64,7 @@ extension DocCArchive.DocCSchema_0_1 { public var schemaVersion : SchemaVersion public var identifier : Identifier - public var documentVersion : Int + public var documentVersion : Int? public var kind : Kind public var metadata : MetaData public var hierarchy : Hierarchy @@ -81,7 +81,7 @@ extension DocCArchive.DocCSchema_0_1 { var ms = " Date: Mon, 19 Jul 2021 22:16:53 +0200 Subject: [PATCH 5/5] Format the JSON a little .. --- .../DocCArchiveTests/Fixtures/Issue7Fail.json | 51 ++++++++++++++++++- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/Tests/DocCArchiveTests/Fixtures/Issue7Fail.json b/Tests/DocCArchiveTests/Fixtures/Issue7Fail.json index 5f36121..9451700 100644 --- a/Tests/DocCArchiveTests/Fixtures/Issue7Fail.json +++ b/Tests/DocCArchiveTests/Fixtures/Issue7Fail.json @@ -37,8 +37,55 @@ "role":"symbol", "symbolKind":"struct", "externalID":"s:12LLabsNetwork4HTTPV", - "modules":[{"name":"LLabsNetwork"}],"navigatorTitle":[{"kind":"identifier","text":"HTTP"}]},"hierarchy":{"paths":[["doc://LLabsNetwork/documentation/LLabsNetwork"]]},"topicSections":[{"title":"Enumerations","identifiers":["doc://LLabsNetwork/documentation/LLabsNetwork/HTTP/Code","doc://LLabsNetwork/documentation/LLabsNetwork/HTTP/Method"]}],"references":{"doc://LLabsNetwork/documentation/LLabsNetwork/HTTP":{"role":"symbol","title":"HTTP","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"HTTP"}],"abstract":[],"identifier":"doc://LLabsNetwork/documentation/LLabsNetwork/HTTP","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"HTTP"}],"url":"/documentation/llabsnetwork/http"},"doc://LLabsNetwork/documentation/LLabsNetwork/HTTP/Method":{"role":"symbol","title":"HTTP.Method","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"Method"}],"abstract":[{"type":"text","text":"HTTP verbs."}],"identifier":"doc://LLabsNetwork/documentation/LLabsNetwork/HTTP/Method","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Method"}],"url":"/documentation/llabsnetwork/http/method"},"doc://LLabsNetwork/documentation/LLabsNetwork/HTTP/Code":{"role":"symbol","title":"HTTP.Code","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"Code"}],"abstract":[{"type":"text","text":"A list of HTTP codes"}],"identifier":"doc://LLabsNetwork/documentation/LLabsNetwork/HTTP/Code","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Code"}],"url":"/documentation/llabsnetwork/http/code"},"doc://LLabsNetwork/documentation/LLabsNetwork":{"role":"collection","title":"LLabsNetwork","abstract":[], - "identifier":"doc://LLabsNetwork/documentation/LLabsNetwork", + "modules":[{"name":"LLabsNetwork"}], + "navigatorTitle":[{"kind":"identifier","text":"HTTP"}] + + }, + "hierarchy":{ + "paths":[["doc://LLabsNetwork/documentation/LLabsNetwork"]] + }, + "topicSections":[ + {"title":"Enumerations","identifiers":["doc://LLabsNetwork/documentation/LLabsNetwork/HTTP/Code","doc://LLabsNetwork/documentation/LLabsNetwork/HTTP/Method"]} + ], + "references":{ + "doc://LLabsNetwork/documentation/LLabsNetwork/HTTP":{ + "role":"symbol","title":"HTTP", + "fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"HTTP"}], + "abstract":[], + "identifier":"doc://LLabsNetwork/documentation/LLabsNetwork/HTTP", + "kind":"symbol","type":"topic", + "navigatorTitle":[ + {"kind":"identifier","text":"HTTP"} + ], + "url":"/documentation/llabsnetwork/http" + }, + "doc://LLabsNetwork/documentation/LLabsNetwork/HTTP/Method":{ + "role":"symbol","title":"HTTP.Method", + "fragments":[ + {"kind":"keyword","text":"enum"}, + {"kind":"text","text":" "}, + {"kind":"identifier","text":"Method"} + ], + "abstract":[{"type":"text","text":"HTTP verbs."}], + "identifier":"doc://LLabsNetwork/documentation/LLabsNetwork/HTTP/Method", + "kind":"symbol","type":"topic", + "navigatorTitle":[ + {"kind":"identifier","text":"Method"} + ], + "url":"/documentation/llabsnetwork/http/method" + }, + "doc://LLabsNetwork/documentation/LLabsNetwork/HTTP/Code":{ + "role":"symbol","title":"HTTP.Code", + "fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"Code"}], + "abstract":[{"type":"text","text":"A list of HTTP codes"}], + "identifier":"doc://LLabsNetwork/documentation/LLabsNetwork/HTTP/Code", + "kind":"symbol","type":"topic", + "navigatorTitle":[{"kind":"identifier","text":"Code"}], + "url":"/documentation/llabsnetwork/http/code" + }, + "doc://LLabsNetwork/documentation/LLabsNetwork":{ + "role":"collection","title":"LLabsNetwork","abstract":[], + "identifier":"doc://LLabsNetwork/documentation/LLabsNetwork", "kind":"symbol","type":"topic","url":"/documentation/llabsnetwork" } }