Skip to content

display arguments as term lists in docc-flavored markdown generation #754

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

Merged
merged 5 commits into from
Apr 23, 2025

Conversation

heckj
Copy link
Contributor

@heckj heckj commented Apr 19, 2025

  • added a Boolean to distinguish regular (GH-flavored) markdown from docc-flavored markdown
  • represent the arguments in generated files with term lists for the docc-flavored variant
  • updated the snapshot tests to work both GH and DocC flavored markdown generation
  • removed an added "\n" in the recording of content for snapshot tests, which caused the snapshot tests some issues (recorded tests with new values wouldn't pass on second-run)

resolves #721

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

@heckj heckj requested a review from rauhul April 19, 2025 21:21
@Option(
name: .shortAndLong,
help: "Use docc flavored markdown for the generated output.")
var doccFlavored: Bool = false
Copy link
Contributor

Choose a reason for hiding this comment

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

I think I might prefer an option more like --style <github|docc>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Easy change, I'll set it up.

heckj and others added 4 commits April 22, 2025 16:00
- added a Boolean to distinguish regular (GH-flavored) markdown from docc-flavored
  markdown
- represent the arguments in generated files with term lists for the
  docc-flavored variant
- updated the snapshot tests to work both GH and DocC flavored markdown
  generation
- removed an added "\n" in the recording of content for snapshot tests,
  which caused the snapshot tests some issues (recorded tests with new
  values wouldn't pass on second-run)
@heckj heckj force-pushed the docc-term-lists branch from dc9c3ed to b58be37 Compare April 22, 2025 23:01
@heckj heckj requested a review from rauhul April 22, 2025 23:18
@heckj heckj force-pushed the docc-term-lists branch from 92c1003 to 34fc135 Compare April 23, 2025 00:07
@heckj
Copy link
Contributor Author

heckj commented Apr 23, 2025

I went through and renamed the plugin to generate-reference (from generate-docc-reference), but that cascaded to a whole bunch of API breakage that just didn't seem warranted for this, so I backed out that commit entirely.

I'm totally game to run through and rename it again in the future, but we'll probably want to wrangle that alongside a major semver version bump, since we're renaming the whole executable of the plugin.

@rauhul
Copy link
Contributor

rauhul commented Apr 23, 2025

@heckj this plugin has never been included in a release so I'm not sure how changing the name could ever be breaking.

@heckj
Copy link
Contributor Author

heckj commented Apr 23, 2025

The soundness checks asserted it was a breaking change, and I wanted to make the rest of this easier rather than piling up deltas. I'll open a new PR to change the name of the plugin. I think swiftly is already using it as it stands, so there may need to be a coordinated PR with them to keep from breaking their CI workflows as we adjust. I'll dig and get it set up.

@rauhul
Copy link
Contributor

rauhul commented Apr 23, 2025

@swift-ci please test

@heckj heckj merged commit cf4c472 into apple:main Apr 23, 2025
23 checks passed
@heckj heckj deleted the docc-term-lists branch April 23, 2025 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

generate-docc-reference: use term lists for arguments
3 participants