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

swift doc generate fails when generating markdown #134

Closed
JaapWijnen opened this issue Jun 12, 2020 · 4 comments
Closed

swift doc generate fails when generating markdown #134

JaapWijnen opened this issue Jun 12, 2020 · 4 comments

Comments

@JaapWijnen
Copy link
Contributor

Hi!
I'm on Ubuntu 18.04.4 LTS installed the Swift 5.2.4 release and built swift doc from source from the master branch (beta.3).
I wanted to generate documentation for www.github.com/vapor/async-kit (master branch).
But this fails when using the following command swift doc generate ./Sources/ --module-name AsyncKit --output Documentation
It prints the following error:
2020-06-12T19:59:49+0000 critical: Unable to construct path for /(_:_:) with baseURL / Fatal error: file /root/swift-doc/Sources/swift-doc/Supporting Types/Page.swift, line 55 Illegal instruction (core dumped)
and exits with exit code 132.
Any ideas what could be causing this?

@a2
Copy link

a2 commented Jun 30, 2020

I'm facing a similar issue:

$ swift doc generate my-repo/Sources --module-name MyRepo
2020-06-30T17:00:13-0400 critical: Unable to construct path for /(lhs:rhs:) with baseURL /
Fatal error: file /private/tmp/swift-doc-20200630-24417-jrxtfw/Sources/swift-doc/Supporting Types/Page.swift, line 55
zsh: illegal hardware instruction  swift doc generate my-repo/Sources --module-name MyRepo

kareman added a commit to kareman/swift-doc that referenced this issue Jul 1, 2020
Fixes crashes like this:

```bash
$ swift doc generate my-repo/Sources --module-name MyRepo
2020-06-30T17:00:13-0400 critical: Unable to construct path for /(lhs:rhs:) with baseURL /
Fatal error: file /private/tmp/swift-doc-20200630-24417-jrxtfw/Sources/swift-doc/Supporting Types/Page.swift, line 55
zsh: illegal hardware instruction  swift doc generate my-repo/Sources --module-name MyRepo
```
kareman added a commit to kareman/swift-doc that referenced this issue Jul 1, 2020
Fixes crashes like this one:

```bash
$ swift doc generate my-repo/Sources --module-name MyRepo
2020-06-30T17:00:13-0400 critical: Unable to construct path for /(lhs:rhs:) with baseURL /
Fatal error: file /private/tmp/swift-doc-20200630-24417-jrxtfw/Sources/swift-doc/Supporting Types/Page.swift, line 55
zsh: illegal hardware instruction  swift doc generate my-repo/Sources --module-name MyRepo
```
@JaapWijnen
Copy link
Contributor Author

@kareman Does this fix work? Could you make a PR? :)

@kareman
Copy link
Contributor

kareman commented Jul 5, 2020

It does when used on https://github.com/kareman/Patterns , but I haven’t tested it on anything else. I was assuming URLComponents was used to cover some edge case I haven’t thought of, so wasn’t sure how generally useful my fix was, but I can make a PR tomorrow.

@JaapWijnen
Copy link
Contributor Author

Awesome :) Does it need any changes before PR? @mattt will probably review it before merging and note any overseen edge cases?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants