profile
viewpoint

Ask questionsOutput is not deterministic and sometimes misses broken links

How to reproduce:

  • clone https://github.com/amethyst/legion and checkout 2e9219326f524ae052b4976f20ec9da3836be720
  • run cargo doc
  • run cargo deadlinks several times
  • sometimes the result will only show one broken link like:
Found invalid urls in /home/martin/dev/rust/legion/target/doc/legion/struct.WorldOptions.html:
        Linked file at path /home/martin/dev/rust/legion/target/doc/storage/struct.Group.html does not exist!
  • sometimes it will find more:
Found invalid urls in /home/martin/dev/rust/legion/target/doc/legion/struct.WorldOptions.html:
        Linked file at path /home/martin/dev/rust/legion/target/doc/storage/struct.Group.html does not exist!
Found invalid urls in /home/martin/dev/rust/legion/target/doc/legion/index.html:
        Linked file at path /home/martin/dev/rust/legion/target/doc/legion/trait.Soa.html does not exist!
        Linked file at path /home/martin/dev/rust/legion/target/doc/legion/struct.SubWorld.html does not exist!
Found invalid urls in /home/martin/dev/rust/legion/target/doc/legion/trait.IntoSoa.html:
        Linked file at path /home/martin/dev/rust/legion/target/doc/legion/trait.Soa.html does not exist!

Could it be because legion uses reexports? E.g. the SubWorld link works from legion::world::EntityStore but not from legion::EntityStore (which is also visible on the main page).

deadlinks/cargo-deadlinks

Answer questions martin-t

Seems this depends on the computer where it runs too - the above outputs are from my laptop, my desktop always produces:

Found invalid urls in /home/martin/dev/rust/legion2/target/doc/legion/struct.World.html:
        Linked file at path /home/martin/dev/rust/legion2/target/doc/query/index.html does not exist!
        Linked file at path /home/martin/dev/rust/legion2/target/doc/storage/struct.ComponentTypeId.html does not exist!
        Linked file at path /home/martin/dev/rust/legion2/target/doc/serialize/struct.Registry.html does not exist!
        Linked file at path /home/martin/dev/rust/legion2/target/doc/query/trait.LayoutFilter.html does not exist!
        Linked file at path /home/martin/dev/rust/legion2/target/doc/serialize/trait.WorldSerializer.html does not exist!
        Linked file at path /home/martin/dev/rust/legion2/target/doc/storage/struct.Group.html does not exist!
        Linked file at path /home/martin/dev/rust/legion2/target/doc/storage/trait.Component.html does not exist!
        Linked file at path /home/martin/dev/rust/legion2/target/doc/legion/struct.Duplicate.html does not exist!
        Linked file at path /home/martin/dev/rust/legion2/target/doc/legion/trait.Merger.html does not exist!
        Linked file at path /home/martin/dev/rust/legion2/target/doc/event/enum.Event.html does not exist!
        Linked file at path /home/martin/dev/rust/legion2/target/doc/legion/struct.Entry.html does not exist!

This output is always the same, even after recloning and using cargo +nightly doc.

However, it still misses the broken links on the main page.

useful!

Related questions

No questions were found.
source:https://uonfu.com/
Github User Rank List