about summary refs log tree commit diff
path: root/src/librustpkg
AgeCommit message (Collapse)AuthorLines
2013-08-10std: Rename Iterator.transform -> .mapErick Tryzelaar-1/+1
cc #5898
2013-08-10Mass rename of .consume{,_iter}() to .move_iter()Erick Tryzelaar-1/+1
cc #7887
2013-08-09Merge remote-tracking branch 'remotes/origin/master' into ↵Erick Tryzelaar-526/+518
remove-str-trailing-nulls
2013-08-09rustpkg: Simplify the PkgId structTim Chevalier-188/+97
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-336/+422
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-09rustpkg: another fix for windowsErick Tryzelaar-1/+2
2013-08-08Merge remote-tracking branch 'remotes/origin/master' into ↵Erick Tryzelaar-0/+1
remove-str-trailing-nulls
2013-08-08rustpkg: Eliminate a copyTim Chevalier-8/+5
2013-08-07rustpkg: Disable test_uninstallBrian Anderson-0/+1
Seems to not work
2013-08-06Merge remote-tracking branch 'remotes/origin/master' into ↵Erick Tryzelaar-3/+3
remove-str-trailing-nulls
2013-08-05Updated std::Option, std::Either and std::ResultMarvin Löbel-3/+3
- Made naming schemes consistent between Option, Result and Either - Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None) - Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
2013-08-04Merge remote-tracking branch 'remotes/origin/master' into str-remove-nullErick Tryzelaar-29/+29
2013-08-04std: replace str::as_c_str with std::c_strErick Tryzelaar-2/+3
2013-08-03remove obsolete `foreach` keywordDaniel Micay-29/+29
this has been replaced by `for`
2013-08-03replace all remaining `for` with `foreach` or `do`Daniel Micay-13/+19
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-29/+29
2013-08-01make `in` and `foreach` get treated as keywordsDaniel Micay-4/+4
2013-07-29auto merge of #8032 : catamorphism/rust/rustpkg-tags, r=graydonbors-80/+132
r? @graydon 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-27to_either + fixesErick Tryzelaar-3/+1
2013-07-27rustc: reorganize driver, replace compile_upto with multiple more-obvious ↵Graydon Hoare-27/+15
functions.
2013-07-26rustpkg: Don't assume a non-numeric refspec is a tagTim Chevalier-3/+10
Just pass it directly to git, without prefixing it with tags/
2013-07-24rustpkg: Handle non-numeric versions; some cleanupTim Chevalier-69/+117
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-24rustpkg: Clean up usage messages for installTim Chevalier-10/+7
2013-07-24auto merge of #7996 : erickt/rust/cleanup-strs, r=ericktbors-3/+3
This is a cleanup pull request that does: * removes `os::as_c_charp` * moves `str::as_buf` and `str::as_c_str` into `StrSlice` * converts some functions from `StrSlice::as_buf` to `StrSlice::as_c_str` * renames `StrSlice::as_buf` to `StrSlice::as_imm_buf` (and adds `StrSlice::as_mut_buf` to match `vec.rs`. * renames `UniqueStr::as_bytes_with_null_consume` to `UniqueStr::to_bytes` * and other misc cleanups and minor optimizations
2013-07-24fix fmt! usageDaniel Micay-1/+1
2013-07-24Change 'print(fmt!(...))' to printf!/printfln! in src/lib*Birunthan Mohanathas-1/+1
2013-07-23std: add test for str::as_c_strErick Tryzelaar-1/+1
2013-07-23std: move StrUtil::as_c_str into StrSliceErick Tryzelaar-2/+2
2013-07-22std: Move change_dir_locked to unstable. #7870Brian Anderson-1/+3
2013-07-22auto merge of #7942 : Dretch/rust/os-listdir-path-no-squiggle, r=brsonbors-2/+2
2013-07-22Ast spanned<T> refactoring, renaming: crate, local, blk, crate_num, crate_cfg.Michael Woerister-11/+12
`crate => Crate` `local => Local` `blk => Block` `crate_num => CrateNum` `crate_cfg => CrateConfig` Also, Crate and Local are not wrapped in spanned<T> anymore.
2013-07-22temporarily disable 3 rustpkg testsDaniel Micay-3/+5
Re-enabling these when the ephemeral failures are fixed is filed as issue #7956.
2013-07-21Remove what appears to be redundant indirection fromGareth Smith-2/+2
os::list_dir_path.
2013-07-20auto merge of #7902 : huonw/rust/attr++, r=cmr,pcwaltonbors-19/+18
This does a number of things, but especially dramatically reduce the number of allocations performed for operations involving attributes/ meta items: - Converts ast::meta_item & ast::attribute and other associated enums to CamelCase. - Converts several standalone functions in syntax::attr into methods, defined on two traits AttrMetaMethods & AttributeMethods. The former is common to both MetaItem and Attribute since the latter is a thin wrapper around the former. - Deletes functions that are unnecessary due to iterators. - Converts other standalone functions to use iterators and the generic AttrMetaMethods rather than allocating a lot of new vectors (e.g. the old code would have to allocate a new vector to use functions that operated on &[meta_item] on &[attribute].) - Moves the core algorithm of the #[cfg] matching to syntax::attr, similar to find_inline_attr and find_linkage_metas. This doesn't have much of an effect on the speed of #[cfg] stripping, despite hugely reducing the number of allocations performed; presumably most of the time is spent in the ast folder rather than doing attribute checks. Also fixes the Eq instance of MetaItem_ to correctly ignore spans, so that `rustc --cfg 'foo(bar)'` now works.
2013-07-20syntax: modernise attribute handling in syntax::attr.Huon Wilson-19/+18
This does a number of things, but especially dramatically reduce the number of allocations performed for operations involving attributes/ meta items: - Converts ast::meta_item & ast::attribute and other associated enums to CamelCase. - Converts several standalone functions in syntax::attr into methods, defined on two traits AttrMetaMethods & AttributeMethods. The former is common to both MetaItem and Attribute since the latter is a thin wrapper around the former. - Deletes functions that are unnecessary due to iterators. - Converts other standalone functions to use iterators and the generic AttrMetaMethods rather than allocating a lot of new vectors (e.g. the old code would have to allocate a new vector to use functions that operated on &[meta_item] on &[attribute].) - Moves the core algorithm of the #[cfg] matching to syntax::attr, similar to find_inline_attr and find_linkage_metas. This doesn't have much of an effect on the speed of #[cfg] stripping, despite hugely reducing the number of allocations performed; presumably most of the time is spent in the ast folder rather than doing attribute checks. Also fixes the Eq instance of MetaItem_ to correctly ignore spaces, so that `rustc --cfg 'foo(bar)'` now works.
2013-07-18rustpkg: Make rustpkg commands work without a package IDTim Chevalier-69/+169
`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-17librustc: Remove some extra "copy" keywords that came in before this change ↵Patrick Walton-1/+1
merged.
2013-07-17test: Fix tests.Patrick Walton-3/+3
2013-07-17librustc: Remove all uses of the `Copy` bound.Patrick Walton-1/+1
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-69/+93
2013-07-17librustc: Add a lint mode for unnecessary `copy` and remove a bunch of them.Patrick Walton-1/+1
2013-07-15rustpkg: Handle local git repositoriesTim Chevalier-103/+378
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-13rustpkg: Address review comments from cmrTim Chevalier-3/+3
2013-07-13rustpkg: Implement `uninstall` and `list` commandsTim Chevalier-34/+226
2013-07-08auto merge of #7262 : nikomatsakis/rust/ref-bindings-in-irrefut-patterns, ↵bors-10/+10
r=catamorphism Correct treatment of irrefutable patterns. The old code was wrong in many, many ways. `ref` bindings didn't work, it sometimes copied when it should have moved, the borrow checker didn't even look at such patterns at all, we weren't consistent about preventing values with destructors from being pulled apart, etc. Fixes #3224. Fixes #3225. Fixes #3255. Fixes #6225. Fixes #6386. r? @catamorphism
2013-07-08Patch up some new errors from rustpkgNiko Matsakis-10/+10
2013-07-08Bump version numbers to 0.8-preBrian Anderson-1/+1
2013-07-07remove some method resolve workaroundsDaniel Micay-8/+8
2013-07-04Bring compiletest/rustpkg/driver up to date on std vs coreAlex Crichton-5/+2
2013-07-04Remove vec::{filter, filtered, filter_map, filter_mapped}, replaced by ↵Huon Wilson-5/+6
iterators.