about summary refs log tree commit diff
path: root/src/librustpkg/workspace.rs
AgeCommit message (Collapse)AuthorLines
2014-02-02Remove rustpkg.Corey Richardson-83/+0
I'm sorry :'( Closes #11859
2014-01-23rustpkg::crate_id: Remove CrateIdklutzy-4/+4
There is no significant difference between `rustpkg::crate_id::CrateId` and `syntax::crateid::CrateId`. rustpkg's one is replaced by syntax's one.
2013-12-29Rename uses of PkgId to CrateId in librustpkgLuis de Bethencourt-10/+10
2013-12-08Remove dead codesKiet Tran-4/+0
2013-11-26librustc: Remove remaining uses of `&fn()` in favor of `||`.Patrick Walton-1/+4
2013-11-03Remove all blocking std::os blocking functionsAlex Crichton-1/+1
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-22Drop the '2' suffix from logging macrosAlex Crichton-1/+1
Who doesn't like a massive renaming?
2013-10-16path2: Update for latest masterKevin Ballard-1/+1
Also fix some issues that crept into earlier commits during the conflict resoution for the rebase.
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-2/+2
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-13/+10
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-10rustpkg: Make checked-out source files read-only, and overhaul where ↵Tim Chevalier-3/+13
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-09-30rustpkg: Remove uses of fmt!Alex Crichton-2/+2
2013-09-12rustpkg: Support sub-package-IDsTim Chevalier-0/+2
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-3/+3
2013-09-08rustpkg: Use workcacheTim Chevalier-1/+1
rustpkg now uses the workcache library to avoid recompilation. Hooray!
2013-08-30rustpkg: Allow package directories to appear in the RUST_PATHTim Chevalier-6/+18
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-27Handle `rustpkg build`, etc. when given no args properlyKevin Ballard-18/+17
`rustpkg build` et al were only checking one directory up to see if it was in a dir named "src". Ditch that entirely and instead check if the cwd is descended from any of the workspace paths. Besides being more intelligent about whether or not something is a workspace, this also allows for package ids composed of multiple path components.
2013-08-10Mass rename of .consume{,_iter}() to .move_iter()Erick Tryzelaar-1/+1
cc #7887
2013-08-09rustpkg: Simplify the PkgId structTim Chevalier-1/+1
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-2/+4
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-1/+1
this has been replaced by `for`
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-1/+1
2013-07-18rustpkg: Make rustpkg commands work without a package IDTim Chevalier-1/+23
`rustpkg build`, if executed in a package source directory inside a workspace, will now build that package. By "inside a workspace" I mean that the parent directory has to be called `src`, and rustpkg will create a `build` directory in .. if there isn't already one. Same goes for `rustpkg install` and `rustpkg clean`. For the time being, `rustpkg build` (etc.) will still error out if you run it inside a directory whose parent isn't called `src`. I'm not sure whether or not it's desirable to have it do something in a non-workspace directory.
2013-07-04Remove vec::{filter, filtered, filter_map, filter_mapped}, replaced by ↵Huon Wilson-2/+3
iterators.
2013-06-29Great renaming: propagate throughout the rest of the codebaseCorey Richardson-1/+1
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-14rustpkg: Write more automated testsTim Chevalier-3/+7
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-01rustc/rusti/rustpkg: Infer packages from `extern mod` directivesTim Chevalier-1/+1
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 (#5682 and #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 #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.
2013-05-14rustpkg: Implement URL-like package IDsTim Chevalier-3/+4
This patch implements package IDs like github.com/catamorphism/test-pkg. To support such package IDs, I changed the PkgId struct to contain a LocalPath and a RemotePath field, where the RemotePath reflects the actual URL and the LocalPath reflects the file name of the cached copy. Right now, the only difference is that the local path doesn't contain dashes, but this will change when we implement #6407. Also, PkgIds now have a short_name field -- though the short name can be derived from the LocalPath, I thought it was cleaner not to call option::get() wantonly.
2013-05-14rustpkg: Remove #[allow(vecs_implicitly_copyable)]Alex Crichton-1/+1
2013-05-14Fix cosmetics for fail!() callsMarvin Löbel-4/+3
2013-05-14Use static string with fail!() and remove fail!(fmt!())Björn Steinbrink-2/+2
fail!() used to require owned strings but can handle static strings now. Also, it can pass its arguments to fmt!() on its own, no need for the caller to call fmt!() itself.
2013-05-10rustpkg: Use the new `for` protocolAlex Crichton-2/+3
2013-04-24rustpkg: Preliminary work on install commandTim Chevalier-0/+34
Mostly just tests (that are ignored); install command is still stubbed out.