about summary refs log tree commit diff
path: root/src/librustpkg/package_source.rs
AgeCommit message (Collapse)AuthorLines
2014-02-02Remove rustpkg.Corey Richardson-554/+0
I'm sorry :'( Closes #11859
2014-01-26auto merge of #11817 : salemtalha/rust/master, r=brsonbors-1/+1
Fixes Issue #11815
2014-01-26Removed all instances of XXX in preparation for relaxing of FIXME ruleSalem Talha-1/+1
2014-01-26Fix privacy fallout from previous changeAlex Crichton-2/+2
2014-01-23rustpkg::crate_id: Remove CrateIdklutzy-23/+51
There is no significant difference between `rustpkg::crate_id::CrateId` and `syntax::crateid::CrateId`. rustpkg's one is replaced by syntax's one.
2014-01-23rustpkg: Compute hash to find crateklutzy-1/+1
Previously rustpkg tried to parse filenames to find crate. Now ue use deterministic hashes, so it becomes possible to directly construct filename and check if the file exists.
2014-01-23rustpkg::version: Remove enum Versionklutzy-3/+3
Currently rustpkg doesn't use SemanticVersion or Tagged, so they are removed. Remaining variants are replaced by `Option<~str>`.
2013-12-29Rename uses of PkgId to CrateId in librustpkgLuis de Bethencourt-14/+14
2013-12-08Remove dead codesKiet Tran-5/+0
2013-12-04Revert "libstd: Change `Path::new` to `Path::init`."Kevin Ballard-3/+3
This reverts commit c54427ddfbbab41a39d14f2b1dc4f080cbc2d41b. Leave the #[ignores] in that were added to rustpkg tests. Conflicts: src/librustc/driver/driver.rs src/librustc/metadata/creader.rs
2013-11-29libstd: Change `Path::new` to `Path::init`.Patrick Walton-3/+3
2013-11-28Register new snapshotsAlex Crichton-1/+1
2013-11-26librustc: Make `||` lambdas not infer to `proc`sPatrick Walton-1/+1
2013-11-26librustc: Remove non-procedure uses of `do` from librustc, librustdoc,Patrick Walton-8/+6
and librustpkg.
2013-11-26librustc: Remove remaining uses of `&fn()` in favor of `||`.Patrick Walton-1/+1
2013-11-26Removed unneccessary `_iter` suffixes from various APIsMarvin Löbel-5/+5
2013-11-16fix 10468, propagate optimization level as rustc::driver::session::OptLevelIan Daniher-1/+4
2013-11-12rustpkg: Eliminate the spurious ↵Tim Chevalier-1/+2
`os::path_exists(&pkg_src.start_dir.join(p))` assertion failure This addresses the problem reported in #10253 and possibly elsewhere. Closes #10253
2013-11-11Move std::rt::io to std::ioAlex Crichton-2/+2
2013-11-04Move io::file to io::fs and fns out of FileAlex Crichton-4/+3
This renames the `file` module to `fs` because that more accurately describes its current purpose (manipulating the filesystem, not just files). Additionally, this adds an UnstableFileStat structure as a nested structure of FileStat to signify that the fields should not be depended on. The structure is currently flagged with #[unstable], but it's unlikely that it has much meaning. Closes #10241
2013-11-03Fill out the remaining functionality in io::fileAlex Crichton-5/+5
This adds bindings to the remaining functions provided by libuv, all of which are useful operations on files which need to get exposed somehow. Some highlights: * Dropped `FileReader` and `FileWriter` and `FileStream` for one `File` type * Moved all file-related methods to be static methods under `File` * All directory related methods are still top-level functions * Created `io::FilePermission` types (backed by u32) that are what you'd expect * Created `io::FileType` and refactored `FileStat` to use FileType and FilePermission * Removed the expanding matrix of `FileMode` operations. The mode of reading a file will not have the O_CREAT flag, but a write mode will always have the O_CREAT flag. Closes #10130 Closes #10131 Closes #10121
2013-11-03Remove all blocking std::os blocking functionsAlex Crichton-8/+9
This commit moves all thread-blocking I/O functions from the std::os module. Their replacements can be found in either std::rt::io::file or in a hidden "old_os" module inside of native::file. I didn't want to outright delete these functions because they have a lot of special casing learned over time for each OS/platform, and I imagine that these will someday get integrated into a blocking implementation of IoFactory. For now, they're moved to a private module to prevent bitrot and still have tests to ensure that they work. I've also expanded the extensions to a few more methods defined on Path, most of which were previously defined in std::os but now have non-thread-blocking implementations as part of using the current IoFactory. The api of io::file is in flux, but I plan on changing it in the next commit as well. Closes #10057
2013-10-27rustpkg: Build dependencies into the correct workspace when using ↵Tim Chevalier-2/+4
--rust-path-hack When invoked with the --rust-path-hack flag, rustpkg was correctly building the package into the default workspace (and not into the build/ subdirectory of the parent directory of the source directory), but not correctly putting the output for any dependencies into the default workspace as well. Spotted by Jack.
2013-10-22rustpkg: Support arbitrary dependencies in the install APITim Chevalier-9/+43
api::install_pkg now accepts an argument that's a list of (kind, path) dependency pairs. This allows custom package scripts to declare C dependencies, as is demonstrated in rustpkg::tests::test_c_dependency_ok. Closes #6403
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-26/+26
Who doesn't like a massive renaming?
2013-10-21rustpkg: Search for crates in the current directoryTim Chevalier-3/+19
As per #8520, find crates in the current working directory even if it's not a workspace. Closes #8520
2013-10-18rustpkg: Make rustpkg tests stop comparing datesTim Chevalier-8/+15
Instead of scrutinizing modification times in rustpkg tests, change output files to be read-only and detect attempts to write to them (hack suggested by Jack). This avoids time granularity problems. As part of this change, I discovered that some dependencies weren't getting written correctly (involving built executables and library files), so this patch fixes that too. This partly addresses #9441, but one test (test_rebuild_when_needed) is still ignored on Linux.
2013-10-16path2: Update for latest masterKevin Ballard-9/+12
Also fix some issues that crept into earlier commits during the conflict resoution for the rebase.
2013-10-16path2: Update based on more review feedbackKevin Ballard-7/+7
Standardize the is_sep() functions to be the same in both posix and windows, and re-export from path. Update extra::glob to use this. Remove the usage of either, as it's going away. Move the WindowsPath-specific methods out of WindowsPath and make them top-level functions of path::windows instead. This way you cannot accidentally write code that will fail to compile on non-windows architectures without typing ::windows anywhere. Remove GenericPath::from_c_str() and just impl BytesContainer for CString instead. Remove .join_path() and .push_path() and just implement BytesContainer for Path instead. Remove FilenameDisplay and add a boolean flag to Display instead. Remove .each_parent(). It only had one caller, so just inline its definition there.
2013-10-15path2: Remove .with_display_str and friendsKevin Ballard-1/+1
Rewrite these methods as methods on Display and FilenameDisplay. This turns do path.with_display_str |s| { ... } into do path.display().with_str |s| { ... }
2013-10-15path2: Adjust the API to remove all the _str mutation methodsKevin Ballard-8/+9
Add a new trait BytesContainer that is implemented for both byte vectors and strings. Convert Path::from_vec and ::from_str to one function, Path::new(). Remove all the _str-suffixed mutation methods (push, join, with_*, set_*) and modify the non-suffixed versions to use BytesContainer.
2013-10-15path2: Replace the path module outrightKevin Ballard-54/+66
Remove the old path. Rename path2 to path. Update all clients for the new path. Also make some miscellaneous changes to the Path APIs to help the adoption process.
2013-10-11extra::tempfile: replace mkdtemp with an RAII wrapperBenjamin Herr-3/+0
this incidentally stops `make check` from leaving directories in `/tmp`
2013-10-10rustpkg: Make checked-out source files read-only, and overhaul where ↵Tim Chevalier-101/+157
temporary files are stored rustpkg now makes source files that it checks out automatically read-only, and stores them under build/. Also, refactored the `PkgSrc` type to keep track of separate source and destination workspaces, as well as to have a `build_workspace` method that returns the workspace to put temporary files in (usually the source, sometimes the destination -- see comments for more details). Closes #6480
2013-10-09option: rewrite the API to use compositionDaniel Micay-1/+1
2013-09-30rustpkg: Remove uses of fmt!Alex Crichton-34/+34
2013-09-27rustpkg: Implement `rustpkg test`Tim Chevalier-1/+5
Towards #7401
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.