about summary refs log tree commit diff
path: root/src/librustpkg
AgeCommit message (Collapse)AuthorLines
2013-08-19rustpkg: Un-ignore most of the remaining testsTim Chevalier-93/+86
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-19Add externfn macro and correctly label fixed_stack_segmentsNiko Matsakis-0/+4
2013-08-16auto merge of #8532 : kballard/rust/cstr-cleanup, r=ericktbors-2/+2
Implement interior null checking in `.to_c_str()`, among other changes.
2013-08-15auto merge of #8518 : catamorphism/rust/issue-8498-workaround, r=brsonbors-4/+6
r? @brson
2013-08-15Add ToCStr method .with_c_str()Kevin Ballard-2/+2
.with_c_str() is a replacement for the old .as_c_str(), to avoid unnecessary boilerplate. Replace all usages of .to_c_str().with_ref() with .with_c_str().
2013-08-14std: Change ProcessOptions struct to have an option of a ~ vectorTim Chevalier-4/+6
This is a workaround for #8498
2013-08-13Remove unused automatic cfg bindings Fixes #7169Nick Desaulniers-2/+2
2013-08-11Cleanup librustpkg a little bit.Steven Stewart-Gallus-74/+77
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-10std: Iterator.len_ -> .lenErick Tryzelaar-2/+2
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