| /external/bazelbuild-rules_rust/crate_universe/src/cli/ |
| D | generate.rs | 1 //! The cli entrypoint for the `generate` subcommand 7 use cargo_lock::Lockfile; 12 use crate::lockfile::{lock_context, write_lockfile}; 17 /// Command line options for the `generate` subcommand 19 #[clap(about = "Command line options for the `generate` subcommand", version)] 37 /// The path to either a Cargo or Bazel lockfile 39 pub lockfile: Option<PathBuf>, field 41 …/// The path to a [Cargo.lock](https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html… 49 /// A [Cargo config](https://doc.rust-lang.org/cargo/reference/config.html#configuration) 54 /// Whether or not to ignore the provided lockfile and re-generate one [all …]
|
| D | query.rs | 11 use crate::lockfile::Digest; 19 /// The lockfile path for reproducible Cargo->Bazel renderings 21 pub lockfile: PathBuf, field 40 /// Determine if the current lockfile needs to be re-pinned 41 pub fn query(opt: QueryOptions) -> Result<()> { in query() 42 // Read the lockfile in query() 43 let content = match fs::read_to_string(&opt.lockfile) { in query() 45 Err(_) => return announce_repin("Unable to read lockfile"), in query() 49 let lockfile: Context = match serde_json::from_str(&content) { in query() localVariable 51 Err(_) => return announce_repin("Could not load lockfile"), in query() [all …]
|
| D | splice.rs | 23 …/// The path to a [Cargo.lock](https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html… 62 pub fn splice(opt: SpliceOptions) -> Result<()> { in splice() 71 temp_dir = tempfile::tempdir().context("Failed to generate temporary directory")?; in splice() 76 // Generate a splicer for creating a Cargo workspace manifest in splice() 84 // Generate a lockfile in splice() 95 let feature_map = FeatureGenerator::new(cargo.clone(), opt.rustc.clone()).generate( in splice() 99 // Write the registry url info to the manifest now that a lockfile has been generated in splice() 114 .generate(manifest_path.as_path_buf())?; in splice() 127 // Generate the consumable outputs of the splicing process in splice() 134 .context("Failed to copy lockfile")?; in splice()
|
| D | vendor.rs | 44 …/// The path to a [Cargo.lock](https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html… 48 /// A [Cargo config](https://doc.rust-lang.org/cargo/reference/config.html#configuration) 54 /// [cargo update](https://doc.rust-lang.org/cargo/commands/cargo-update.html). See 78 fn buildifier_format(bin: &Path, file: &Path) -> Result<ExitStatus> { in buildifier_format() 80 .args(["-lint=fix", "-mode=fix", "-warnings=all"]) in buildifier_format() 93 fn locate_bazel_output_base(bazel: &Path, workspace_dir: &Path) -> Result<PathBuf> { in locate_bazel_output_base() 115 pub fn vendor(opt: VendorOptions) -> Result<()> { in vendor() 124 // Generate a splicer for creating a Cargo workspace manifest in vendor() 135 // Gather a cargo lockfile in vendor() 147 let feature_map = FeatureGenerator::new(cargo.clone(), opt.rustc.clone()).generate( in vendor() [all …]
|
| /external/bazelbuild-rules_rust/crate_universe/test_data/private/ |
| D | metadata_generator.py | 14 def run_subprocess(command: List[str]) -> subprocess.CompletedProcess[str]: 20 print("stderr:", proc.stderr.decode("utf-8"), file=sys.stderr) 21 print("stdout:", proc.stdout.decode("utf-8"), file=sys.stderr) 51 lockfile = manifest_dir / "Cargo.lock" variable 53 if lockfile.exists(): 54 … proc = run_subprocess([cargo, "update", "--manifest-path", str(manifest), "--workspace"]) 56 # Generate Lockfile 57 … proc = run_subprocess([cargo, "generate-lockfile", "--manifest-path", str(manifest)]) 59 if not lockfile.exists(): 60 print("Faield to generate lockfile") [all …]
|
| /external/bazelbuild-rules_rust/crate_universe/src/ |
| D | metadata.rs | 16 use cargo_lock::Lockfile as CargoLockfile; 22 use crate::lockfile::Digest; 29 // TODO: This should also return a set of [crate-index::IndexConfig]s for packages in metadata.pack… 32 fn generate<T: AsRef<Path>>(&self, manifest_path: T) -> Result<(CargoMetadata, CargoLockfile)>; in generate() method 35 /// Generates Cargo metadata and a lockfile from a provided manifest. 45 pub(crate) fn new() -> Self { in new() 54 pub(crate) fn with_cargo(mut self, cargo_bin: Cargo) -> Self { in with_cargo() 59 pub(crate) fn with_rustc(mut self, rustc_bin: PathBuf) -> Self { in with_rustc() 66 fn generate<T: AsRef<Path>>(&self, manifest_path: T) -> Result<(CargoMetadata, CargoLockfile)> { in generate() method 71 let lockfile = { in generate() localVariable [all …]
|
| D | splicing.rs | 50 fn from_str(s: &str) -> Result<Self, Self::Err> { in from_str() 56 pub(crate) fn try_from_path<T: AsRef<Path>>(path: T) -> Result<Self> { in try_from_path() 61 pub(crate) fn resolve(self, workspace_dir: &Path, output_base: &Path) -> Self { in resolve() 116 fn try_from(value: SplicingManifest) -> Result<Self, Self::Error> { in try_from() 184 fn try_from(value: toml::Value) -> Result<Self, Self::Error> { in try_from() 185 match value.get("cargo-bazel") { in try_from() 190 None => bail!("cargo-bazel workspace metadata not found"), in try_from() 198 fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> { in try_from() 199 match value.get("cargo-bazel") { in try_from() 203 None => bail!("cargo-bazel workspace metadata not found"), in try_from() [all …]
|
| D | lockfile.rs | 1 //! Utility module for interacting with the cargo-bazel lockfile. 26 ) -> Result<Context> { in lock_context() 27 // Ensure there is no existing checksum which could impact the lockfile results in lock_context() 31 .context("Failed to generate context digest")?; in lock_context() 40 pub(crate) fn write_lockfile(lockfile: Context, path: &Path, dry_run: bool) -> Result<()> { in write_lockfile() 41 let content = serde_json::to_string_pretty(&lockfile)?; in write_lockfile() 67 ) -> Result<Self> { in new() 104 ) -> Self { in compute() 133 pub(crate) fn bin_version(binary: &Path) -> Result<String> { in bin_version() 138 .arg("--version") in bin_version() [all …]
|
| D | context.rs | 16 use crate::lockfile::Digest; 51 pub(crate) fn try_from_path<T: AsRef<Path>>(path: T) -> Result<Self> { in try_from_path() 56 pub(crate) fn new(annotations: Annotations) -> Result<Self> { in new() 66 &annotations.lockfile.crates, in new() 81 // Only consider remote repositories (so non-workspace members). in new() 93 // Generate a list of all workspace members in new() 159 ) -> Result<String> { in get_package_path_id() 195 pub(crate) fn workspace_member_deps(&self) -> BTreeSet<CrateDependency> { in workspace_member_deps() 211 pub(crate) fn has_duplicate_workspace_member_dep(&self, dep: &CrateDependency) -> bool { in has_duplicate_workspace_member_dep() 219 pub(crate) fn has_duplicate_binary_crate(&self, bin: &CrateId) -> bool { in has_duplicate_binary_crate() [all …]
|
| /external/bazelbuild-rules_rust/crate_universe/private/ |
| D | crates_repository.bzl | 30 # Generate a config file for all settings 55 # If re-pinning is enabled, gather additional inputs for the generator 58 # Generate a top level Cargo workspace and manifest for use in generation 101 # add a label to a lockfile path specifically for Bazel. 103 … attrs.update({"lockfile": repository_ctx.attr.cargo_lockfile.relative("cargo-bazel-lock.json")}) 115 | --- | --- | 117 | `CARGO_BAZEL_GENERATOR_URL` | The URL of a cargo-bazel binary. This variable takes precedence ove… 119 …N` may also be used. See [Repinning / Updating Dependencies](#repinning--updating-dependencies) fo… 120 | `CARGO_BAZEL_REPIN_ONLY` | A comma-delimited allowlist for rules to execute repinning. Can be use… 150 lockfile = "//:cargo-bazel-lock.json", [all …]
|
| D | generate_utils.bzl | 1 """Utilities directly related to the `generate` step of `cargo-bazel`.""" 20 """Query network resources to locate a `cargo-bazel` binary 27 tuple(path, dict): The path to a `cargo-bazel` binary and the host sha256 pairing. 35 …output = repository_ctx.path("cargo-bazel.exe" if "win" in repository_ctx.os.name else "cargo-baze… 84 build_file_template = "//:BUILD.{name}-{version}.bazel", 85 crate_label_template = "@{repository}__{name}-{version}//:{target}", 86 crate_repository_template = "{repository}__{name}-{version}", 101 | --- | --- | 104 | `triple` | A platform triple. Eg `x86_64-unknown-linux-gnu` | 124 …generate_target_compatible_with (bool, optional): Whether to generate `target_compatible_with` an… [all …]
|
| D | srcs.bzl | 1 """A generate file containing all source files used to produce `cargo-bazel`""" 10 Label("//crate_universe:src/api/lockfile.rs"), 12 Label("//crate_universe:src/cli/generate.rs"), 21 Label("//crate_universe:src/lockfile.rs"),
|
| D | splicing_utils.bzl | 1 """Utilities directly related to the `splicing` step of `cargo-bazel`.""" 8 [rv]: https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions 23 """Ensure the key value of the data given are kebab-case 29 dict: The same `data` but with kebab-case keys 32 key.lower().replace("_", "-"): val 39 [cargo_config]: https://doc.rust-lang.org/cargo/reference/config.html 40 [cargo_toml]: https://doc.rust-lang.org/cargo/reference/manifest.html 54 # Ensure the data is using kebab-case as that's what `cargo_toml::DependencyDetail` expects. 59 # Auto-generated splicier manifest values 69 …"""Strips leading '@'s for stringified labels in the main repository for backwards-comaptibility r… [all …]
|
| /external/rust/crates/fallible-iterator/.circleci/ |
| D | config.yml | 6 key: registry-{{ .BuildNum }} 8 - /usr/local/cargo/registry/index 10 key: deps-{{ checksum "~/rust-version" }}-{{ checksum "Cargo.lock" }} 18 - target 19 - /usr/local/cargo/registry/cache 25 - image: rust:1.33.0 27 RUSTFLAGS: -D warnings 30 - checkout 31 - *RESTORE_REGISTRY 32 - run: cargo generate-lockfile [all …]
|
| /external/bazelbuild-rules_rust/crate_universe/ |
| D | extension.bzl | 1 """Module extension for generating third-party crates for use in bazel.""" 48 regen_command = "Run 'cargo update [--workspace]'", 84 splicing_output_dir = tag_path.get_child("splicing-output") 87 "--output-dir", 89 "--config", 91 "--splicing-manifest", 93 "--cargo-lockfile", 97 # Create a lockfile, since we need to parse it to generate spoke 99 lockfile_path = tag_path.get_child("lockfile.json") 103 "generate", [all …]
|
| D | docs.bzl | 16 flags such as [`bootstrap = True`](#crate_universe_dependencies-bootstrap) on the `crate_universe_d… 17 call above or [crates_repository::generator_urls](#crates_repository-generator_urls) in uses of `cr… 21 - [crates_repository](#crates_repository) 22 - [crates_vendor](#crates_vendor) 26 - [crate_universe_dependencies](#crate_universe_dependencies) 27 - [crate.annotation](#crateannotation) 28 - [crate.select](#crateselect) 29 - [crate.spec](#cratespec) 30 - [crate.workspace_member](#crateworkspace_member) 31 - [render_config](#render_config) [all …]
|
| /external/rust/crates/fallible-streaming-iterator/.circleci/ |
| D | config.yml | 6 key: registry-{{ .BuildNum }} 8 - /usr/local/cargo/registry/index 10 key: deps-{{ checksum "~/rust-version" }}-{{ checksum "Cargo.lock" }} 18 - target 19 - /usr/local/cargo/registry/cache 26 - image: rust:1.19.0 28 RUSTFLAGS: -D warnings 30 - checkout 31 - *RESTORE_REGISTRY 32 - run: cargo generate-lockfile [all …]
|
| /external/bazelbuild-rules_rust/docs/ |
| D | crate_universe.md | 1 <!-- Generated with Stardoc: http://skydoc.bazel.build --> 18 flags such as [`bootstrap = True`](#crate_universe_dependencies-bootstrap) on the `crate_universe_d… 19 call above or [crates_repository::generator_urls](#crates_repository-generator_urls) in uses of `cr… 23 - [crates_repository](#crates_repository) 24 - [crates_vendor](#crates_vendor) 28 - [crate_universe_dependencies](#crate_universe_dependencies) 29 - [crate.annotation](#crateannotation) 30 - [crate.select](#crateselect) 31 - [crate.spec](#cratespec) 32 - [crate.workspace_member](#crateworkspace_member) [all …]
|
| /external/rust/crates/either/.github/workflows/ |
| D | ci.yml | 11 runs-on: ubuntu-latest 13 fail-fast: false 16 - 1.36.0 # MSRV 17 - stable 18 - beta 19 - nightly 21 - "" 22 - "serde" 25 - name: Checkout 28 - name: Set up Rust [all …]
|
| /external/rust/crates/serde_test/.github/workflows/ |
| D | ci.yml | 13 RUSTFLAGS: -Dwarnings 18 runs-on: ubuntu-latest 20 fail-fast: false 23 timeout-minutes: 45 25 - uses: actions/checkout@v3 26 - uses: dtolnay/rust-toolchain@master 29 - run: cargo build 30 - run: cargo test --features serde/derive,serde/rc 34 runs-on: ubuntu-latest 35 timeout-minutes: 45 [all …]
|
| /external/rust/crates/hashlink/.circleci/ |
| D | config.yml | 6 - image: circleci/rust:latest 8 - checkout 9 - run: 13 rustup toolchain install nightly -c miri rust-src rustfmt 14 - run: 17 rustc --version 18 cargo --version 19 rustc +nightly --version 20 cargo +nightly --version 21 rustup --version [all …]
|
| /external/rust/crates/walkdir/.github/workflows/ |
| D | ci.yml | 6 - master 8 - cron: '00 01 * * *' 12 runs-on: ${{ matrix.os }} 16 - pinned 17 - pinned-win 18 - stable 19 - beta 20 - nightly 21 - macos 22 - win-msvc [all …]
|
| /external/bazelbuild-rules_rust/crate_universe/src/splicing/ |
| D | splicer.rs | 42 const IGNORE_LIST: &[&str] = &[".git", "bazel-*", ".svn"]; 49 ) -> Result<Self> { in new() 71 // This is an error case - we've detected some manifests are in a workspace, but can't in new() 157 ) -> Result<BTreeSet<String>> { in find_missing_manifests() 188 pub(crate) fn splice(&self, workspace_dir: &Path) -> Result<SplicedManifest> { in splice() 213 ) -> Result<SplicedManifest> { in splice_workspace() 249 ) -> Result<SplicedManifest> { in splice_package() 290 ) -> Result<SplicedManifest> { in splice_multi_package() 330 fn setup_cargo_config(cargo_config_path: &Option<PathBuf>, workspace_dir: &Path) -> Result<()> { in setup_cargo_config() 420 ) -> Result<BTreeMap<&'b PathBuf, String>> { in inject_workspace_members() [all …]
|
| /external/bazelbuild-rules_android/ |
| D | MODULE.bazel | 24 # go-related dependency setup 27 bazel_dep(name = "abseil-py", version = "1.4.0", repo_name = "py_absl") 41 # python-related dependency setup 44 # proto-related dependency setup 45 bazel_dep(name = "rules_proto", version = "5.3.0-21.7", repo_name = "rules_proto") 50 # To generate the maven lockfile, run this command: 51 # bazel run --noenable_bzlmod @rules_android_maven//:pin
|
| /external/rust/crates/quote/.github/workflows/ |
| D | ci.yml | 13 RUSTFLAGS: -Dwarnings 23 runs-on: ubuntu-latest 25 fail-fast: false 28 timeout-minutes: 45 30 - uses: actions/checkout@v4 31 - uses: dtolnay/rust-toolchain@master 34 components: rust-src 35 - name: Enable type layout randomization 36 run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV 38 - run: cargo test [all …]
|