Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uprustdoc: Fix source-links for files with absolute-paths #31835
Conversation
rust-highfive
assigned
alexcrichton
Feb 23, 2016
mitaa
force-pushed the
mitaa:rdoc-global-src
branch
2 times, most recently
from
53bd2ee
to
78ca2e2
Feb 23, 2016
alexcrichton
reviewed
Feb 23, 2016
| -include ../tools.mk | ||
|
|
||
| all: | ||
| printf "#[path=\"%s/%s\"] pub mod baz;\n" `pwd` "bar/baz.rs" > foo.rs |
This comment has been minimized.
This comment has been minimized.
alexcrichton
Feb 23, 2016
Member
Perhaps this could be a unix-only rustdoc test which has a module with the path as /dev/null? That would avoid run-make and you could still check for the module page, right?
This comment has been minimized.
This comment has been minimized.
mitaa
Feb 23, 2016
Author
Contributor
Didn't think of that, but it seems like rustdoc doesn't generate files for empty public modules.
That did make another bug clear though, namely that absolute paths not contained in the root directory are still broken just like before.
(I'm gonna try to put these in a src/__root__ directory; for example /dev/null -> src/__root__/dev/null.html)
This comment has been minimized.
This comment has been minimized.
alexcrichton
Feb 23, 2016
Member
Hm ok, I just try to avoid run-make like the plague as makefiles are basically impossible to get right on both windows and unix...
This comment has been minimized.
This comment has been minimized.
mitaa
force-pushed the
mitaa:rdoc-global-src
branch
from
78ca2e2
to
0db42c3
Feb 23, 2016
This comment has been minimized.
This comment has been minimized.
|
I pushed an update so that this also works for absolute paths not contained in the root directory. That would unfortunately be even worse to test, so I didn't include one. (works locally though) |
alexcrichton
reviewed
Feb 23, 2016
| p.to_path_buf() | ||
| } | ||
| } | ||
| }; |
This comment has been minimized.
This comment has been minimized.
alexcrichton
Feb 23, 2016
Member
This seems kinda sketchy, perhaps the iterator below could use components on Path to only look at the Component::Normal parts?
mitaa
force-pushed the
mitaa:rdoc-global-src
branch
from
0db42c3
to
4037a7d
Feb 23, 2016
This comment has been minimized.
This comment has been minimized.
|
(updated) I've preserved the |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Feb 24, 2016
This comment has been minimized.
This comment has been minimized.
|
|
mitaa
added some commits
Feb 24, 2016
mitaa
force-pushed the
mitaa:rdoc-global-src
branch
from
4037a7d
to
cf76fcf
Feb 24, 2016
This comment has been minimized.
This comment has been minimized.
|
I think I've made your This has required commit mitaa@27ca250, because |
mitaa commentedFeb 23, 2016
fixes #26995
r? @alexcrichton