about summary refs log tree commit diff
path: root/src/librustpkg/api.rs
AgeCommit message (Collapse)AuthorLines
2014-02-02Remove rustpkg.Corey Richardson-199/+0
I'm sorry :'( Closes #11859
2014-01-23rustpkg::crate_id: Remove CrateIdklutzy-19/+16
There is no significant difference between `rustpkg::crate_id::CrateId` and `syntax::crateid::CrateId`. rustpkg's one is replaced by syntax's one.
2014-01-23rustpkg::version: Remove enum Versionklutzy-6/+5
Currently rustpkg doesn't use SemanticVersion or Tagged, so they are removed. Remaining variants are replaced by `Option<~str>`.
2014-01-11extra::workcache: Remove unused Loggerklutzy-3/+2
2014-01-07Fix remaining cases of leaking importsAlex Crichton-0/+1
2014-01-05Move syslog to BuildContextNiels langager Ellegaard-1/+1
2013-12-29Rename uses of PkgId to CrateId in librustpkgLuis de Bethencourt-9/+9
2013-12-14Fix #10754 - `std::run` functions fail after io_errorCadence Marseille-12/+16
The problem was that std::run::Process::new() was unwrap()ing the result of std::io::process::Process::new(), which returns None in the case where the io_error condition is raised to signal failure to start the process. Have std::run::Process::new() similarly return an Option<run::Process> to reflect the fact that a subprocess might have failed to start. Update utility functions run::process_status() and run::process_output() to return Option<ProcessExit> and Option<ProcessOutput>, respectively. Various parts of librustc and librustpkg needed to be updated to reflect these API changes. closes #10754
2013-12-04Revert "libstd: Change `Path::new` to `Path::init`."Kevin Ballard-3/+3
This reverts commit c54427ddfbbab41a39d14f2b1dc4f080cbc2d41b. Leave the #[ignores] in that were added to rustpkg tests. Conflicts: src/librustc/driver/driver.rs src/librustc/metadata/creader.rs
2013-11-29libstd: Change `Path::new` to `Path::init`.Patrick Walton-3/+3
2013-11-13Add build_lib_with_cfgs, build_bin_with_cfgs to rustpkg API. Closes #9944.Zack Corr-2/+12
2013-11-12Implemented a ProcessExit enum and helper methods to std::rt::io::process ↵Matthew Iselin-5/+4
for getting process termination status, or the signal that terminated a process. A test has been added to rtio-processes.rs to ensure signal termination is picked up correctly.
2013-11-03Remove all blocking std::os blocking functionsAlex Crichton-3/+3
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-22rustpkg: Support arbitrary dependencies in the install APITim Chevalier-10/+86
api::install_pkg now accepts an argument that's a list of (kind, path) dependency pairs. This allows custom package scripts to declare C dependencies, as is demonstrated in rustpkg::tests::test_c_dependency_ok. Closes #6403
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-1/+1
Who doesn't like a massive renaming?
2013-10-15path2: Adjust the API to remove all the _str mutation methodsKevin Ballard-5/+5
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-6/+6
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-11/+17
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-1/+1
2013-09-18rustpkg: Register correct dependencies for built and installed filesTim Chevalier-2/+5
as per #9112 Closes #9112
2013-09-18rustpkg: Make crates, not packages, the unit of rustpkg dependenciesTim Chevalier-36/+21
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-10rustpkg: Pass command-line arguments to rustcTim Chevalier-1/+2
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-54/+22
2013-09-08rustpkg: Use workcacheTim Chevalier-41/+103
rustpkg now uses the workcache library to avoid recompilation. Hooray!
2013-08-30rustpkg: Allow package directories to appear in the RUST_PATHTim Chevalier-1/+6
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-09std/rustc/rustpkg/syntax: Support the `extern mod = ...` formTim Chevalier-15/+9
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-07-17librustc: Remove all uses of "copy".Patrick Walton-3/+3
2013-07-15rustpkg: Handle local git repositoriesTim Chevalier-6/+6
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-04Bring compiletest/rustpkg/driver up to date on std vs coreAlex Crichton-2/+0
2013-06-29Great renaming: propagate throughout the rest of the codebaseCorey Richardson-5/+5
2013-06-25rustpkg: Begin allowing package scripts to call the default build logicTim Chevalier-0/+92
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