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

initial adoption of DocC based documentaiton #2235

Merged
merged 5 commits into from
Aug 8, 2022
Merged

Conversation

tomerd
Copy link
Member

@tomerd tomerd commented Aug 4, 2022

motivation: use DocC for docs

change:

  • add DocC catalog to NIO target, as the "landing page"
  • remove jazzy doc generation script
  • add Package.swift with tools-version 5.6 so that DocC can be used, and add a dependency on the DocC plugin
  • udpate soundness script

_

motivation: use DocC for docs

change:
* add DocC catalog to NIO target, as the "landing page"
* remove jazzy doc generation script
* add Package.swift with tools-version 5.6 so that DocC can be used, and add a dependency on the DocC plugin
* udpate soundness script
Package@swift-5.6.swift Outdated Show resolved Hide resolved
Sources/NIO/Docs.docc/index.md Outdated Show resolved Hide resolved
@@ -0,0 +1,183 @@
# ``NIO`` <!-- SwiftNIO -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated: should be doc be updated to cover async/await support?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea,probably follow on PR or commits? this is all taken from the current readme

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably follow on PR or commits?

yeah

Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Generally looks good, some notes in the diff.

Package@swift-5.6.swift Outdated Show resolved Hide resolved
Package@swift-5.6.swift Outdated Show resolved Hide resolved
* adjust waning-as-error and enable-test-discovery to the different permutations
@tomerd tomerd changed the title [wip] initial adoption of DocC based documentaiton initial adoption of DocC based documentaiton Aug 5, 2022
Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one, thanks!

@Lukasa Lukasa added the needs-no-version-bump For PRs that when merged do not need a bump in version number. label Aug 8, 2022
@Lukasa Lukasa enabled auto-merge (squash) August 8, 2022 10:26
@Lukasa
Copy link
Contributor

Lukasa commented Aug 8, 2022

Flaky test: ChannelTests.testConnectWithECONNREFUSEDGetsTheRightError.

@Lukasa
Copy link
Contributor

Lukasa commented Aug 8, 2022

@swift-nio-bot test this please

@Lukasa Lukasa merged commit 712e207 into apple:main Aug 8, 2022
@@ -1,4 +1,4 @@
// swift-tools-version:5.4
// swift-tools-version:5.6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strangely, this change now requires that --enable-test-discovery be passed when compiling the tests on linux/Android, or it errors like this with 5.6, 5.7, and trunk:

swift-nio/Tests/LinuxMain.swift:146:1: error: expressions are not allowed at the top level
(LinuxMainRunnerImpl() as LinuxMainRunner).run()

Anyone know what's going on?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is a bug in SwiftPM.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I'll file a bug for SPM.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Lukasa Now that NIO supports 5.4 as a minimum can LinuxMain.swift not just be removed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly no. NIO tests with --warnings-as-errors, and we have number of tests for deprecated code. The test discovery stubs in SwiftPM generate warnings when those tests are present up until 5.6, which is why our CI continues to use LinuxMain.swift for 5.4 and 5.5. But we are at least finally on a path to dropping it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be fixed in 5.7 and main. but perhaps not available in the nightly toolchain yet?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is fixed with the latest Aug. 9 trunk snapshot build for linux, but I'm using a June trunk snapshot because of another breaking regression for me. As you noted in that issue, should only be a problem with 5.6 now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea will be hard to justify pulling into 5.6 given workaround.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which workaround? Adding @main is a non-starter if someone is testing 5.3 and earlier, when the attribute wasn't there, swiftlang/swift@df99de8. As for overriding it with --enable-test-discovery, adding that only for 5.6.3 for all future CI testing is going to be annoying and has other consequences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-no-version-bump For PRs that when merged do not need a bump in version number.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants