Giter Site home page Giter Site logo

Comments (8)

leif-ibsen avatar leif-ibsen commented on August 28, 2024 1

I tried, and now it all seems to work. Thank you

from swift-docc.

d-ronnqvist avatar d-ronnqvist commented on August 28, 2024

This issue has previously been reported in #714 and fixed in #717 and #739. Both those PRs have also been cherry-picked into the 5.10 release in #750 and #772.

Please check with the latest main or the 5.10 release to see if there are any other bugs with linking to operators still impacting that project and reopen this issue with more information if there are any.

from swift-docc.

leif-ibsen avatar leif-ibsen commented on August 28, 2024

I'm afraid I can't figure out how to download and install release 5.10.

I guess it will be in the next Xcode release, so I'll have to wait for that.

from swift-docc.

d-ronnqvist avatar d-ronnqvist commented on August 28, 2024

You can download a 5.10 toolchain for Xcode from swift.org/download/. After you run the installer you can change toolchains from the Xcode > Toolchains menu.

Screenshot 2024-01-22 at 14 05 57

This menu group is only visible when you have one or more custom toolchains installed.

from swift-docc.

leif-ibsen avatar leif-ibsen commented on August 28, 2024

Just one more question. When I use toolchain 5.10 in Xcode everything works,
but when I execute the command line command

swift package --disable-sandbox preview-documentation --taget BigInt

to build the documentation, the problem is still there,
so it seems that the old toolchain is used.

How can I force toolchain 5.10 to be used in this situation?

from swift-docc.

d-ronnqvist avatar d-ronnqvist commented on August 28, 2024

Yes, the toolchain setting in Xcode only applies to Xcode. You can pass a --toolchain argument to the swift CLI to use a custom toolchain. For example:

swift package \
 --toolchain /Users/YOUR_USERNAME/Library/Developer/Toolchains/swift-5.10-DEVELOPMENT-SNAPSHOT-2024-01-18-a.xctoolchain \
 --disable-sandbox \
 preview-documentation \
 --target BigInt

from swift-docc.

leif-ibsen avatar leif-ibsen commented on August 28, 2024

It works, thank you.
It seems that the --disable-sandbox argument must come first, though.

from swift-docc.

leif-ibsen avatar leif-ibsen commented on August 28, 2024

Sorry to bother you again, but although everything looks fine when generating documentation in Xcode
with the 'Build Documentation' command, there are still problems when trying to publish to GitHub Pages.

I made a small test package DocCTest with the operators

- -= / /= % %= << <<= >> >>=

and tried to preview the documentation with the command

swift package --toolchain /Library/Developer/Toolchains/swift-5.10-DEVELOPMENT-SNAPSHOT-2024-01-25-a.xctoolchain
--disable-sandbox preview-documentation --target DocCTest --port 8082

and it gave me the following warnings

/Users/leifibsen/Documents/SwiftXcode/DocCTest/Sources/DocCTest/DocCTest.docc/Extensions/BIntExt.md:19:5: warning: Can't resolve '(::)-3woeb'
/Users/leifibsen/Documents/SwiftXcode/DocCTest/Sources/DocCTest/DocCTest.docc/Extensions/BIntExt.md:20:5: warning: Can't resolve '(::)-2wsf1'
/Users/leifibsen/Documents/SwiftXcode/DocCTest/Sources/DocCTest/DocCTest.docc/Extensions/BIntExt.md:21:5: warning: Can't resolve '=(::)'

but it was still possible to see all operators in the preview.

I then published to GitHub Pages with the command

swift package --toolchain /Library/Developer/Toolchains/swift-5.10-DEVELOPMENT-SNAPSHOT-2024-01-25-a.xctoolchain
--allow-writing-to-directory ./docs generate-documentation --target DocCTest
--disable-indexing --transform-for-static-hosting --hosting-base-path DocCTest --output-path ./docs

You can see the result at

https://leif-ibsen.github.io/DocCTest/documentation/docctest

Clicking one of the operators % %= << <<= >> >>= gives

The page you're looking for can't be found.

although it works in the preview.

I wonder what is wrong?

Best regards

from swift-docc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.