Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Issues generating HTML documentation for Nuke #25

Closed
kean opened this issue Apr 1, 2020 · 7 comments
Closed

Issues generating HTML documentation for Nuke #25

kean opened this issue Apr 1, 2020 · 7 comments
Labels
bug Something isn't working
Projects

Comments

@kean
Copy link
Contributor

kean commented Apr 1, 2020

Hi Mattt, this looks absolutely fantastic and I would really like to start using swift-doc in my projects. I downloaded the latest swift-doc version from master (85b5872) and tried running it against Nuke's master.

swift doc generate ~/Develop/Nuke/Sources/ --output Documentation --format html --module-name Nuke

My command line tools are set to Xcode 11.4.

It seems it got a bit confused. I think it might be because of some of the "namespaces" and typealiases.

The actual types are named ImageProcessors.GaussianBlur, etc.

Screen Shot 2020-04-01 at 13 13 56

Documentation.zip

@kean
Copy link
Contributor Author

kean commented Apr 1, 2020

What I also noticed is that:

  • It generated documentation for internal types.
  • It got confused with enumerations. For example, for ImagePipeline/index.html file it added 12 enumeration cases. They all actually belong to different types, not to ImagePipeline.
  • Some types appear as nested types, e.g. ImageTask.ImageContainer, when in reality they are not, they are just defined in the same file (ImageTask.swift in this case).

@mattt
Copy link
Contributor

mattt commented Apr 1, 2020

Thanks for your feedback, @kean!

Responding really quick to your first point, about the incorrect (long) type names: I was seeing the same thing with #16, but thought it was limited to Linux. I'll be really happy if I can reproduce it locally with Nuke; that'll let me troubleshoot the issue much more easily.

@mattt mattt added this to To do in SwiftDoc Apr 2, 2020
@mattt mattt added the bug Something isn't working label Apr 2, 2020
@mattt
Copy link
Contributor

mattt commented Apr 5, 2020

@kean, this should be fixed by #51. Can you please try running this again with the latest master?

@kean
Copy link
Contributor Author

kean commented Apr 5, 2020

Thanks, @mattt! Most of the issues have been resolved.

I still observe an issue with nested types.

  • There is a nested struct ImagePipeline.Configuation. In the generated documentation, all of the fields of this struct are displayed as fields of ImagePipeline itself. There are also displayed as fields of ImagePipeline.Configuation, but the in-line documentation is gone. ImagePipeline.Configuration is declared in a separate file.

Is it worth opening a separate issue?

@kean
Copy link
Contributor Author

kean commented Apr 5, 2020

One more note, the HTML links in the documentation don't work if you browse it locally, which is a bit inconvenient. Jazzy on the other hand, works locally just fine.

@mattt
Copy link
Contributor

mattt commented Apr 5, 2020

@kean Thanks for following up. I'll have a full response for you soon, but I wanted to address one quick thing:

One more note, the HTML links in the documentation don't work if you browse it locally, which is a bit inconvenient.

It doesn't work if you open the html files directly, but you can make it work by running a local web server at the root of the generated directory. On macOS, the default Python distribution should provide a convenient, built-in solution:

$ python -m SimpleHTTPServer 5000 .build/documentation/

Then in another terminal window:

$ open http://localhost:5000

@kean
Copy link
Contributor Author

kean commented Apr 11, 2020

Closing as the reported issue was fixed by #62. If I encounter more issues, I will report them separately.

@kean kean closed this as completed Apr 11, 2020
SwiftDoc automation moved this from To do to Done Apr 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
SwiftDoc
  
Done
Development

No branches or pull requests

2 participants