Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install source code for debugging #19535

Closed
brson opened this issue Dec 4, 2014 · 15 comments
Closed

Install source code for debugging #19535

brson opened this issue Dec 4, 2014 · 15 comments
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.)

Comments

@brson
Copy link
Contributor

brson commented Dec 4, 2014

In order to debug std the source code must be present. It's complicated because you really want to use unoptimized builds for debugging, so this might entail some complicated installation scenarios where you have both optimized and unoptimized std.

@brson
Copy link
Contributor Author

brson commented Jan 14, 2015

Also necessary for racer: https://www.reddit.com/r/rust/comments/2sfmtj/racerrustup/

@brson brson mentioned this issue Jan 14, 2015
65 tasks
@brson brson added A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) A-tools labels Apr 23, 2015
@bruno-medeiros
Copy link

I'm not sure yet the best way to do it. Adding docs to the installer has already drawn consternation for the bloat. I'm interested in pursuing an 'online' installer that only downloads components on demand, which would free us up to package more stuff.

"Adding docs to the installer has already drawn consternation for the bloat" Really?.. Hah, I'm surprised in this day an age people are still picky about that.
Still, surely that mustn't be much of an issue for the standard library sources? I reckon they should be just a couple of few Mbs, properly compressed. I couldn't check it myself since I can't quickly figure out from the Rust sources which ones are standard library, and which are the compiler/rest-of-the-toolchain.

@genodeftest
Copy link
Contributor

How about providing a separate command line option for the sources?

@antonkulaga
Copy link

any progress on this?

@nrc
Copy link
Member

nrc commented Aug 13, 2015

cc @nrc

@brson
Copy link
Contributor Author

brson commented Sep 4, 2015

Some comments from IRC

11:22 <&brson> posix4e: there are a few steps to making source easily installable: package and deploy it in rust-installer format, teach the channel metadata about it, teach rustup.sh how to install source 
               packages
11:22 <&brson> the first is easy to tackle locally. the second requires hacking our infrastructure
11:22 <&brson> to make source packages you've basically got to add to the makefiles rules like https://github.com/rust-lang/rust/blob/master/mk/dist.mk#L143
11:23 <&brson> it'll take the entire source, probably as *already* tarred here https://github.com/rust-lang/rust/blob/master/mk/dist.mk#L36
11:23 <&brson> then invoke rust-installer to turn it into a rustc-source package
11:24 <&brson> (though maybe std-source would be better? hard to pull out just the std source)
11:24 <&brson> once the makefiles know how to create rustc-source they'll automatically start uploading with nightlies
11:25 <&brson> one wrinkle here is that source is target-agnostic and all our existing bins are target-specific, so named e.g. rustc-*-x86_64-etc
11:25 <&brson> we *might* just go ahead and stick with that scheme, producing a bunch of identical source artifacts that are named differently, per target
11:25 <&brson> but that seems wasteful
11:26 <&brson> i think just calling it rustc-source-{version}.tar.gz is probably fine, but we've got to consider the naming of the existing source tarballs (which is not a rust-installer package), and whether it 
               conflicts

@fenduru
Copy link
Contributor

fenduru commented Dec 11, 2015

cc @fenduru

I think everyone would be very happy with something very basic even if it is far from perfect - just enough for multirust/other tools to fetch the source and keep racer up to date with nightlies

@Valloric
Copy link
Contributor

Valloric commented Jan 9, 2016

Since YCM now provides Rust completion support (through the YCM -> ycmd -> racerd -> racer chain), we too would love to see Rust standard library source code installed as part of the Rust installation. The code-completion experience is sub-par when the user hasn't gone through the hassle of downloading Rust source and then setting the correct YCM conf option to tell us where that is. Few users will go read the docs and understand this option needs to be set.

Currently we're adding an error message for this case so that the user has something to go on besides "completion failed," but it's still a shitty user experience. If the stdlib source code could be installed along with rustc & cargo, then Rust code-completion, GoTo etc would Just Work out of the box (for YCM at least).

@AlexRadch
Copy link

Where instructions how to download Rust sources?
I want configure RustDT (https://github.com/RustDT/RustDT/blob/latest/documentation/UserGuide.md) but I don't see any instructions here. I use Windows.

@genodeftest
Copy link
Contributor

@AlexRadch : Go to https://www.rust-lang.org/downloads.html and click on "Source".

@RobertWHurst
Copy link

Any progress on this?

@japaric
Copy link
Member

japaric commented Jul 18, 2016

@RobertWHurst PR #34366 is a requisite for this.

@brson
Copy link
Contributor Author

brson commented Aug 22, 2016

Almost working. We're producing the source packages, but they are busted. Next fix is rust-lang/rust-installer#48

@RobertWHurst
Copy link

Very cool. Can't wait 😃

@alexcrichton
Copy link
Member

We've got rustup component add rust-src now, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.)
Projects
None yet
Development

No branches or pull requests