Bug#846177: [Pkg-rust-maintainers] Bug#846177: Bug#846177: A rustc-src package would be useful for racer completion

2016-12-11 Thread Josh Triplett
On Sun, Dec 11, 2016 at 05:55:46PM -0300, Dato Simó wrote:
> > I'm becoming a big fan of racer, so I'm all for this! I haven't
> > looked at the internals however - I presume racer only needs the
> > source for std (and core) not the compiler itself?
> 
> Yes, I think you are correct: only libstd sources are needed,
> which are about 3 MiB.
> 
> Two additional notes:
> 
>   1. the _root_ location of the source SHOULD be
>  ‘$prefix/lib/rustlib/src’ (this has been standardized
>  by the Rust community, see [rust-buildbot#102]).
> 
>  In other words, the following file should exist after
>  installing the package:
> 
>  /usr/lib/rustlib/src/rust/src/libstd/io/mod.rs

It seems unfortunate that upstream standardized on a location in
/usr/lib, rather than /usr/share.

>  Racer has already been updated to search the source there,
>  in the absence of RUST_SRC_PATH (see [racer#598]).

Does racer also benefit from having library crate sources installed?  If
so, how and where does it expect to find those?

Asking because with the current draft packaging policy, we install
library crate sources to /usr/share/cargo/registry/cratename-version.

- Josh Triplett



Bug#846177: [Pkg-rust-maintainers] Bug#846177: A rustc-src package would be useful for racer completion

2016-12-11 Thread Dato Simó
> I'm becoming a big fan of racer, so I'm all for this! I haven't
> looked at the internals however - I presume racer only needs the
> source for std (and core) not the compiler itself?

Yes, I think you are correct: only libstd sources are needed,
which are about 3 MiB.

Two additional notes:

  1. the _root_ location of the source SHOULD be
 ‘$prefix/lib/rustlib/src’ (this has been standardized
 by the Rust community, see [rust-buildbot#102]).

 In other words, the following file should exist after
 installing the package:

 /usr/lib/rustlib/src/rust/src/libstd/io/mod.rs

 Racer has already been updated to search the source there,
 in the absence of RUST_SRC_PATH (see [racer#598]).

  2. If only libstd is included, perhaps the package should be
 named libstd-rust-src (for symmetry with libstd-rust-dev),
 instead of rust-src.

Thanks for considering,

d.


[rust-buildbot#102]
https://github.com/rust-lang/rust-buildbot/pull/102#issuecomment-222771857

[racer#598] https://github.com/phildawes/racer/pull/598


Bug#846177: [Pkg-rust-maintainers] Bug#846177: A rustc-src package would be useful for racer completion

2016-12-10 Thread Angus Lees
On Tue, 29 Nov 2016, 10:51 Dato Simó  wrote:

> It would be nice to have a rustc-src package containing the source for
> Rust itself.
>
> The (widely-used) racer completion engine needs access to the source in
> order to work.
>

I'm becoming a big fan of racer, so I'm all for this!  I haven't looked at
the internals however - I presume racer only needs the source for std (and
core) not the compiler itself?

 - Gus

>


Bug#846177: A rustc-src package would be useful for racer completion

2016-11-28 Thread Dato Simó
Source: rustc
Severity: wishlist

It would be nice to have a rustc-src package containing the source
for Rust itself.

The (widely-used) racer completion engine needs access to the
source in order to work.

There is precedent for this, for example Go provides a golang-src
package.

I don't think that the racer dependency on the source code is
going away any time soon — though if it were, that would be a
reason not to introduce a source package.

Thanks for considering,

-d