about summary refs log tree commit diff
path: root/src/librustpkg/rustpkg.rs
AgeCommit message (Collapse)AuthorLines
2013-09-24Don't use libc::exit. #9473Brian Anderson-10/+14
This can cause unexpected errors in the runtime when done while scheduler threads are still initializing. Required some restructuring of the main_args functions in our libraries.
2013-09-23librustpkg: Fix diagnostic invocation syntax in librustdoc, librusti, and ↵Patrick Walton-1/+3
librustpkg.
2013-09-21Update version numbers to 0.8Brian Anderson-1/+1
2013-09-20auto merge of #9322 : catamorphism/rust/rustpkg-discovered-outputs, r=brsonbors-3/+3
r? @brson as per #9112 Closes #9112
2013-09-19Turned extra::getopts functions into methodsMarvin Löbel-26/+26
Some minor api and doc adjustments
2013-09-18rustpkg: Register correct dependencies for built and installed filesTim Chevalier-3/+3
as per #9112 Closes #9112
2013-09-18rustpkg: Make crates, not packages, the unit of rustpkg dependenciesTim Chevalier-112/+171
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-0/+16
This will initialize a new workspace.
2013-09-12rustpkg: Install to RUST_PATHTim Chevalier-9/+24
Install to the first directory in the RUST_PATH if the user set a RUST_PATH. In the case where RUST_PATH isn't set, the behavior remains unchanged. Closes #7402
2013-09-12rustpkg: Search RUST_PATH properly for dependencies, and add a test for ↵Tim Chevalier-1/+1
recursive dependencies Closes #8524
2013-09-10rustpkg: Pass command-line arguments to rustcTim Chevalier-26/+117
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-22/+19
2013-09-08rustpkg: Use workcacheTim Chevalier-86/+149
rustpkg now uses the workcache library to avoid recompilation. Hooray!
2013-09-05Rename str::from_bytes to str::from_utf8, closes #8985Florian Hahn-1/+1
2013-08-30rustpkg: Allow package directories to appear in the RUST_PATHTim Chevalier-44/+77
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-15/+12
`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-27auto merge of #8773 : catamorphism/rust/rustpkg-version-flag, r=anasazibors-1/+9
r? anyone. Now, rustpkg --version does something useful!
2013-08-26rustpkg: Implement --version command-line optionTim Chevalier-1/+9
Now, rustpkg --version does something useful!
2013-08-26rustpkg: Test that different copies of the same package ID can exist in ↵Tim Chevalier-0/+2
multiple workspaces The test checks that rustpkg uses the first one, rather than complaining about multiple matches. Closes #7241
2013-08-23removed os::set_args, closing #8325Do Nhat Minh-1/+4
removed pub on real_args, changed test to use args
2013-08-19rustpkg: Un-ignore most of the remaining testsTim Chevalier-12/+14
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-13Remove unused automatic cfg bindings Fixes #7169Nick Desaulniers-1/+1
2013-08-10std: Rename Iterator.transform -> .mapErick Tryzelaar-1/+1
cc #5898
2013-08-09rustpkg: Simplify the PkgId structTim Chevalier-7/+6
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-43/+33
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-05Updated std::Option, std::Either and std::ResultMarvin Löbel-2/+2
- 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-03remove obsolete `foreach` keywordDaniel Micay-2/+2
this has been replaced by `for`
2013-08-03replace all remaining `for` with `foreach` or `do`Daniel Micay-9/+13
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-2/+2
2013-07-27rustc: reorganize driver, replace compile_upto with multiple more-obvious ↵Graydon Hoare-7/+4
functions.
2013-07-22Ast spanned<T> refactoring, renaming: crate, local, blk, crate_num, crate_cfg.Michael Woerister-2/+2
`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-18rustpkg: Make rustpkg commands work without a package IDTim Chevalier-38/+52
`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 all uses of "copy".Patrick Walton-9/+9
2013-07-15rustpkg: Handle local git repositoriesTim Chevalier-7/+32
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-2/+25
2013-07-08Bump version numbers to 0.8-preBrian Anderson-1/+1
2013-07-01rustc: add a lint to enforce uppercase statics.Huon Wilson-3/+3
2013-06-30Bump version from 0.7-pre to 0.7Brian Anderson-1/+1
2013-06-29Great renaming: propagate throughout the rest of the codebaseCorey Richardson-19/+10
2013-06-28librustc: Fix even *more* merge fallout!Patrick Walton-0/+1
2013-06-28librustc: Rewrite reachability and forbid duplicate methods in type ↵Patrick Walton-1/+14
implementations. This should allow fewer symbols to be exported.
2013-06-25rustpkg: Begin allowing package scripts to call the default build logicTim Chevalier-12/+19
rustpkg/api.rs provides functions intended for package scripts to call. It will probably need more functionality added to it later, but this is a start. Added a test case checking that a package script can use the API. Closes #6401
2013-06-25Rename all files with the 'rc' extensionAlex Crichton-0/+474