about summary refs log tree commit diff
path: root/src/librustpkg/package_source.rs
AgeCommit message (Collapse)AuthorLines
2013-09-25rustpkg: Search for packages correctly when using the rust_path_hackTim Chevalier-1/+2
Previously, any package would match any other package ID when searching using the rust_path_hack, so long as the directory had one or more crate files in it. Now, rustpkg checks that the parent directory matches the package ID. Closes #9273
2013-09-18rustpkg: Make crates, not packages, the unit of rustpkg dependenciesTim Chevalier-19/+43
Treating a package as the thing that can have other packages depend on it, and depends on other packages, was wrong if a package has more than one crate. Now, rustpkg knows about dependencies between crates in the same package. This solves the problem reported in #7879 where rustpkg wrongly discovered a circular dependency between thhe package and itself, and recursed infinitely. Closes #7879
2013-09-13auto merge of #9148 : jakub-/rust/rustpkg-install-mkdir-p, r=catamorphismbors-5/+7
Testing this is a little tricky as an intermediate temporary directory is only used for remote git repositories and therefore that path cannot be reliably exercised in the tests.
2013-09-12Fix rustpkg install for git repositoriesJakub-5/+7
2013-09-12rustpkg: Support sub-package-IDsTim Chevalier-6/+37
Package IDs can now refer to a subdirectory of a particular source tree, and not just a top-level directory with a src/ directory as its parent. For example, referring to the package ID a/b/c/d , in workspace W, if W/src/a is a package, will build the sources for the package in a/b/c/d (and not other crates in W/src/a). Closes #6408
2013-09-08rustpkg: Address review comments from JackTim Chevalier-32/+28
2013-09-08rustpkg: Use workcacheTim Chevalier-93/+154
rustpkg now uses the workcache library to avoid recompilation. Hooray!
2013-09-04auto merge of #8978 : pnkfelix/rust/make-path-api-less-allocation-happy, r=huonwbors-6/+6
A [dialogue](https://github.com/mozilla/rust/pull/8909#discussion-diff-6102725) on PR #8909 inspired me to make this change. r? anyone (It is possible that `std::path` itself will soon be replaced with a new implementation that kballard's working on, as mentioned in the dialogue linked above, but this revision is simple enough that I figured I'd offer it up.)
2013-09-04Update clients of path.rs to use new API.Felix S. Klock II-6/+6
In most cases this involved removing a ~str allocations or clones (yay), or coercing a ~str to a slice. In a few places, I had to bind an intermediate Path (e.g. path.pop() return values), so that it would live long enough to support the borrowed &str. And in a few places, where the code was actively using the property that the old API returned ~str's, I had to put in to_owned() or clone(); but in those cases, we're trading an allocation within the path.rs code for one in the client code, so they neutralize each other.
2013-09-04Added explicit pub to several conditions. Enables completion of #6009.Felix S. Klock II-0/+1
2013-08-30rustpkg: Allow package directories to appear in the RUST_PATHTim Chevalier-22/+80
This commit adds a rustpkg flag, --rust-path-hack, that allows rustpkg to *search* inside package directories if they appear in the RUST_PATH, while *building* libraries and executables into a different target directory. This behavior is hidden behind a flag because I believe we only want to support it temporarily, to make it easier to port servo to rustpkg. This commit also includes a fix for how rustpkg fetches sources from git repositories -- it uses a temporary directory as the target when invoking `git clone`, then moves that directory into the workspace if the clone was successful. (The old behavior was that when the `git clone` failed, the empty target directory would be left lying around anyway.)
2013-08-19rustpkg: Un-ignore most of the remaining testsTim Chevalier-1/+1
This necessitated some cleanup to how we parse library filenames when searching for libraries, since rustpkg may now create filenames that contain '-' characters. Also cleaned up how rustpkg passes the sysroot to a custom build script.
2013-08-11Cleanup librustpkg a little bit.Steven Stewart-Gallus-23/+24
Mostly I did simple transformations from imperative style loops to more functional iterator based transformations.
2013-08-10std: Transform.find_ -> .findErick Tryzelaar-1/+1
2013-08-09rustpkg: Simplify the PkgId structTim Chevalier-28/+10
Get rid of special cases for names beginning with "rust-" or containing hyphens, and just store a Path in a package ID. The Rust-identifier for the crate is none of rustpkg's business.
2013-08-09std/rustc/rustpkg/syntax: Support the `extern mod = ...` formTim Chevalier-12/+9
This commit allows you to write: extern mod x = "a/b/c"; which means rustc will search in the RUST_PATH for a package with ID a/b/c, and bind it to the name `x` if it's found. Incidentally, move get_relative_to from back::rpath into std::path
2013-08-03remove obsolete `foreach` keywordDaniel Micay-3/+3
this has been replaced by `for`
2013-08-03replace all remaining `for` with `foreach` or `do`Daniel Micay-2/+3
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-3/+3
2013-07-24rustpkg: Handle non-numeric versions; some cleanupTim Chevalier-17/+7
Package IDs can now be of the form a/b/c#FOO, where (if a/b/c is a git repository) FOO is any tag in the repository. Non-numeric tags only match against package IDs with the same tag, and aren't compared linearly like numeric versions. While I was at it, refactored the code that calls `git clone`, and segregated build output properly for different packages.
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-9/+9
2013-07-15rustpkg: Handle local git repositoriesTim Chevalier-2/+16
rustpkg can now build code from a local git repository. In the case where the local repo is in a directory not in the RUST_PATH, it checks out the repository into a directory in the first workspace in the RUST_PATH. The tests no longer try to connect to github.com, which should solve some of the sporadic failures we've been seeing.
2013-07-08Patch up some new errors from rustpkgNiko Matsakis-1/+1
2013-07-04Bring compiletest/rustpkg/driver up to date on std vs coreAlex Crichton-1/+0
2013-06-29Great renaming: propagate throughout the rest of the codebaseCorey Richardson-3/+3
2013-06-27Convert vec::[mut_]slice to methods, remove vec::const_slice.Huon Wilson-3/+2
2013-06-23vec: remove BaseIter implementationDaniel Micay-2/+2
I removed the `static-method-test.rs` test because it was heavily based on `BaseIter` and there are plenty of other more complex uses of static methods anyway.
2013-06-21vec: rm old_iter implementations, except BaseIterDaniel Micay-2/+2
The removed test for issue #2611 is well covered by the `std::iterator` module itself. This adds the `count` method to `IteratorUtil` to replace `EqIter`.
2013-06-14rustpkg: Write more automated testsTim Chevalier-2/+3
Automate more tests described in the commands.txt file, and add infrastructure for running them. Right now, tests shell out to call rustpkg. This is not ideal.
2013-06-12Silence some warnings.Huon Wilson-1/+1
2013-06-11option: remove redundant old_iter implsDaniel Micay-1/+1
2013-06-09rustpkg: Accept package IDs like github.com/foo/bar#0.3Tim Chevalier-0/+239
If the package ID is of the form s#v, where v is a valid version string, fetch tag v of that package.