DocC absolute links in combined documentation

Hi!

Recently, I've spent a good amount of time with DocC and docbuild for comparison. I must say, both are quite intimidating to get 100% right for distribution, but I could reproduce the single misbehavior that's preventing me from going forward.

After hours of fiddling, I noticed that absolute links may be interpreted as relative under a specific, yet common condition, which is when the "outer" package adds a public extension of the "inner" package. By inner/outer I follow the nomenclature used here, where outer depends on inner and outer can link to inner entities.

I created a sample repo with the motivations and the steps to reproduce the issue. I can look into a fix if you have an idea what to look at, as docbuild is not really a feasible alternative for my use case.

Thanks in advance.

1 Like

This is a great example case, thank you!

If you haven’t already, I’d very much recommend opening an issue at GitHub - swiftlang/swift-docc: Documentation compiler that produces rich API reference documentation and interactive tutorials for your Swift framework or package. describing and referencing your example. That will provide a great place to discuss diagnosing what’s happening and coordinate how to make relevant fixes.

Oh, okay. I asked here because I didn't know if this would fall within the realm of DocC or the plugin. I'll go ahead to swift-docc. Thanks Joseph.

1 Like

No worries - it can be difficult to sort out! In this case, it's in the heart of DocC itself (due to it being about symbol resolution within the markdown content, rather than the orchestration of wrangling targets and extracting symbols).

Exactly! For the record: Absolute links in combined/merged documentation · Issue #1257 · swiftlang/swift-docc · GitHub

2 Likes