-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Rustpkg and rustc should use RUST_PATH env var to locate packages #5682
Labels
A-driver
Area: rustc_driver that ties everything together into the `rustc` compiler
A-linkage
Area: linking into static, shared libraries and binaries
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-hard
Call for participation: Hard difficulty. Experience needed to fix: A lot.
Milestone
Comments
ghost
assigned catamorphism
Apr 2, 2013
catamorphism
added a commit
to catamorphism/rust
that referenced
this issue
May 29, 2013
This commit won't be quite as useful until I implement RUST_PATH and until we change `extern mod` to take a general string instead of an identifier (rust-lang#5682 and rust-lang#6407). With that said, now if you're using rustpkg and a program contains: extern mod foo; rustpkg will attempt to search for `foo`, so that you don't have to provide a -L directory explicitly. In addition, rustpkg will actually try to build and install `foo`, unless it's already installed (specifically, I tested that `extern mod extra;` would not cause it to try to find source for `extra` and compile it again). This is as per rust-lang#5681. Incidentally, I changed some driver code to infer the link name from the crate link_meta attributes. If that change isn't ok, say something.
catamorphism
added a commit
to catamorphism/rust
that referenced
this issue
May 30, 2013
This commit won't be quite as useful until I implement RUST_PATH and until we change `extern mod` to take a general string instead of an identifier (rust-lang#5682 and rust-lang#6407). With that said, now if you're using rustpkg and a program contains: extern mod foo; rustpkg will attempt to search for `foo`, so that you don't have to provide a -L directory explicitly. In addition, rustpkg will actually try to build and install `foo`, unless it's already installed (specifically, I tested that `extern mod extra;` would not cause it to try to find source for `extra` and compile it again). This is as per rust-lang#5681. Incidentally, I changed some driver code to infer the link name from the crate link_meta attributes. If that change isn't ok, say something. Also, I changed the addl_lib_search_paths field in the session options to be an @mut ~[Path] so that it can be modified after expansion but before later phases.
catamorphism
added a commit
to catamorphism/rust
that referenced
this issue
Jun 2, 2013
This commit won't be quite as useful until I implement RUST_PATH and until we change `extern mod` to take a general string instead of an identifier (rust-lang#5682 and rust-lang#6407). With that said, now if you're using rustpkg and a program contains: extern mod foo; rustpkg will attempt to search for `foo`, so that you don't have to provide a -L directory explicitly. In addition, rustpkg will actually try to build and install `foo`, unless it's already installed (specifically, I tested that `extern mod extra;` would not cause it to try to find source for `extra` and compile it again). This is as per rust-lang#5681. Incidentally, I changed some driver code to infer the link name from the crate link_meta attributes. If that change isn't ok, say something. Also, I changed the addl_lib_search_paths field in the session options to be an @mut ~[Path] so that it can be modified after expansion but before later phases.
catamorphism
added a commit
to catamorphism/rust
that referenced
this issue
Jun 12, 2013
This commit won't be quite as useful until I implement RUST_PATH and until we change `extern mod` to take a general string instead of an identifier (rust-lang#5682 and rust-lang#6407). With that said, now if you're using rustpkg and a program contains: extern mod foo; rustpkg will attempt to search for `foo`, so that you don't have to provide a -L directory explicitly. In addition, rustpkg will actually try to build and install `foo`, unless it's already installed (specifically, I tested that `extern mod extra;` would not cause it to try to find source for `extra` and compile it again). This is as per rust-lang#5681. Incidentally, I changed some driver code to infer the link name from the crate link_meta attributes. If that change isn't ok, say something.
This was referenced Jun 18, 2013
catamorphism
added a commit
to catamorphism/rust
that referenced
this issue
Jun 26, 2013
Unfortunately, the main test for this is ignored due to rust-lang#7071. Closes rust-lang#5682
This was referenced Jun 26, 2013
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Aug 11, 2020
…r=Manishearth Avoid or_fun_call for const_fn with no args Based on rust-lang#5682 by @lzutao This avoids a subset of false positives, specifically those related to `const fn`s that take no arguments. For the rest, a much more involved fix would be needed, see rust-lang/rust-clippy#5682 (comment). So this does *not* solve rust-lang#5658 changelog: Avoid triggering [`or_fun_call`] with `const fn`s that take no arguments. Fixes rust-lang#5886
This was referenced Oct 22, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-driver
Area: rustc_driver that ties everything together into the `rustc` compiler
A-linkage
Area: linking into static, shared libraries and binaries
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-hard
Call for participation: Hard difficulty. Experience needed to fix: A lot.
Sub-bug of #5677
We want to support multiple overlaid stores of libraries and workspaces. Rustpkg should follow a similar strategy to Go here, wherein there's an environment variable -- say
$RUST_PATH
-- that is a colon (or semi on windows) separated list of "directories in which to resolve pkgids", and the first existing entry in the search path is the directory in which new packages are fetched and installed by default. Target libs need to be put in an arch-specific subdir.At the end of the
$RUST_PATH
search (and therefore also the default if users don't define a$RUST_PATH
) we should also include some implicit search entries:.rust
in$CWD
and every parent of$CWD
up to the filesystem root.rust
in the user's homedir, if it existsThe rustc driver should also understand how to search these paths for libraries.
Note that while it is desirable for rustpkg to be "purely functional" and thereby automatically segregate separate builds of the same artifact by storing built artifacts under different version-prefixed or input-hash-prefixed directories, in practice there will always be cases of missing or uncaptured dependencies (environment-sensitivity is very hard to rule out) and providing "different builds in different locations under the user's control" is a necessary mechanism for working around these cases.
The text was updated successfully, but these errors were encountered: