about summary refs log tree commit diff
path: root/src/librustpkg/util.rs
AgeCommit message (Collapse)AuthorLines
2013-09-25rustpkg: Search for packages correctly when using the rust_path_hackTim Chevalier-23/+20
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-23librustc: Remove `@fn` managed closures from the language.Patrick Walton-2/+2
2013-09-23libsyntax: Remove some more `@fn` usesPatrick Walton-30/+61
2013-09-23librustpkg: Fix diagnostic invocation syntax in librustdoc, librusti, and ↵Patrick Walton-2/+7
librustpkg.
2013-09-23librustc: Change fold to use traits instead of `@fn`.Patrick Walton-14/+21
2013-09-18rustpkg: Register correct dependencies for built and installed filesTim Chevalier-1/+22
as per #9112 Closes #9112
2013-09-18rustpkg: Make crates, not packages, the unit of rustpkg dependenciesTim Chevalier-36/+22
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-17Implementing 'rustpkg init'.Steve Klabnik-1/+1
This will initialize a new workspace.
2013-09-14rustpkg: Always write a package_id attribute into the link metadataTim Chevalier-4/+2
For some reason, I thought it wasn't necessary to write the package_id attribute (which rustc's filesearch checks when searching for a package) if the package ID had a single component (like "foo") as opposed to multiple components (like "foo/bar/quux"). This meant that `extern mod quux = "an-awesome-library";` didn't work, even if an-awesome-library existed in the RUST_PATH. Fixed it.
2013-09-13rustc/rustpkg: Use a target-specific subdirectory in build/ and lib/Tim Chevalier-3/+4
As per rustpkg.md, rustpkg now builds in a target-specific subdirectory of build/, and installs libraries into a target-specific subdirectory of lib. Closes #8672
2013-09-12rustpkg: Search RUST_PATH properly for dependencies, and add a test for ↵Tim Chevalier-9/+21
recursive dependencies Closes #8524
2013-09-12rustpkg: Support sub-package-IDsTim Chevalier-2/+4
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-10rustpkg: Pass command-line arguments to rustcTim Chevalier-25/+43
rustpkg now accepts most of rustc's command-line arguments and passes them along to rustc when building or installing. A few rarely-used arguments aren't implemented yet. rustpkg doesn't support flags that don't make sense with rustpkg (for example, --bin and --lib, which get inferred from crate file names). Closes #8522
2013-09-08rustpkg: Address review comments from JackTim Chevalier-17/+18
2013-09-08rustpkg: Use workcacheTim Chevalier-63/+85
rustpkg now uses the workcache library to avoid recompilation. Hooray!
2013-09-02Renamed syntax::ast::ident -> IdentMarvin Löbel-2/+2
2013-09-01Modernized a few type names in rustc and syntaxMarvin Löbel-3/+3
2013-08-30rustpkg: Allow package directories to appear in the RUST_PATHTim Chevalier-0/+7
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-26rustpkg: Test that different copies of the same package ID can exist in ↵Tim Chevalier-10/+25
multiple workspaces The test checks that rustpkg uses the first one, rather than complaining about multiple matches. Closes #7241
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-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-13Remove unused automatic cfg bindings Fixes #7169Nick Desaulniers-1/+1
2013-08-09Merge remote-tracking branch 'remotes/origin/master' into ↵Erick Tryzelaar-42/+64
remove-str-trailing-nulls
2013-08-09rustpkg: Simplify the PkgId structTim Chevalier-4/+4
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-42/+64
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-06Merge remote-tracking branch 'remotes/origin/master' into ↵Erick Tryzelaar-1/+1
remove-str-trailing-nulls
2013-08-05Updated std::Option, std::Either and std::ResultMarvin Löbel-1/+1
- 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-5/+5
2013-08-04std: replace str::as_c_str with std::c_strErick Tryzelaar-2/+3
2013-08-03remove obsolete `foreach` keywordDaniel Micay-5/+5
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-5/+5
2013-07-27rustc: reorganize driver, replace compile_upto with multiple more-obvious ↵Graydon Hoare-20/+11
functions.
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-22Ast spanned<T> refactoring, renaming: crate, local, blk, crate_num, crate_cfg.Michael Woerister-9/+10
`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-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-17librustc: Remove all uses of "copy".Patrick Walton-15/+19
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-1/+1
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: Implement `uninstall` and `list` commandsTim Chevalier-7/+4
2013-07-08Patch up some new errors from rustpkgNiko Matsakis-3/+3
2013-07-07remove some method resolve workaroundsDaniel Micay-1/+1
2013-07-04Bring compiletest/rustpkg/driver up to date on std vs coreAlex Crichton-1/+2
2013-07-04Remove vec::{filter, filtered, filter_map, filter_mapped}, replaced by ↵Huon Wilson-3/+3
iterators.
2013-07-01rustc: add a lint to enforce uppercase statics.Huon Wilson-3/+3
2013-06-29Great renaming: propagate throughout the rest of the codebaseCorey Richardson-3/+2
2013-06-27rustpkg: Silence extra output from rustpkg testsTim Chevalier-1/+5
Closes #7250