Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
- Change order of choice selection for conflicts on update (https://github.com/pulp-platform/bender/pull/237).
- Refactor CLI, group flags, add aliases and support for env variables (https://github.com/pulp-platform/bender/pull/240).
- Consolidate warnings, suppression and deduplication (https://github.com/pulp-platform/bender/pull/246).
- Add default `remotes` to manifest to allow specifying multiple (default) remotes for dependencies, without having to write out the full git url every time (https://github.com/pulp-platform/bender/pull/260).

## 0.29.1 - 2025-11-24
### Fixed
Expand Down
39 changes: 31 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,24 +101,47 @@ package:
# By convention, authors should be listed in the form shown below.
authors: ["John Doe <john@doe.si>"]

# Specify git remotes for dependencies. Optional.
remotes:
pulp:
url: "https://github.com/pulp-platform"
default: true # Only required if multiple remotes are specified.

# Additional non-default remotes (HTTP or SSH).
openhw: "https://github.com/openhwgroup"
# Template remote URL where `{}` is a placeholder for dependency name.
# If no placeholder is found, "<url>/{}.git" is used.
internal: "git@gitlab.company.com:internal-repo/{}/release"

# Other packages this package depends on. Optional.
dependencies:
# Path dependency.
axi: { path: "../axi" }

# Registry dependency. Not supported at the moment.
# common_verification: "0.2"
# Git version dependency from default remote.
apb: "0.2"

# Git version dependency, only included if target "test" or "regression_test" is set.
common_verification: { git: "git@github.com:pulp-platform/common_verification.git", version: "0.2", target: "any(test, regression_test)" }
# Git version dependency from non-default remote.
fll: { version: "0.8", remote: "internal" }

# Git version dependency with explicit git url.
ara: { git: "https://github.com/john_doe/ara.git", version: "2" }

# Git revision dependency (always requires explicit git url).
spatz: {git: "https://github.com/pulp-platform/spatz.git", rev: "fixes" }

# Git version dependency, only included if target "test" or "regression_test" is set.
common_verification: { version: "0.2", target: "any(test, regression_test)" }

# Git revision dependency, passing a custom target (equivalent to `-t common_cells:cc_custom_target`).
common_cells: { git: "git@github.com:pulp-platform/common_cells.git", rev: master, pass_targets: ["cc_custom_target"] }
# Git revision dependency, passing a custom target.
# (equivalent to `-t common_cells:cc_custom_target`).
common_cells: { rev: master, pass_targets: ["cc_custom_target"] }

# Git version dependency, passing conditional targets to a dependency (equivalent to `-t cva6:cv64a6_imafdcv_sv39` if target 64bit is set, `-t cva6:cv32a6_imac_sv32` if target 32bit is set)
# Git version dependency, passing conditional targets to a dependency
# (equivalent to `-t cva6:cv64a6_imafdcv_sv39` if target 64bit is set,
# `-t cva6:cv32a6_imac_sv32` if target 32bit is set)
ariane:
git: "git@github.com:openhwgroup/cva6.git"
remote: openhw
version: 5.3.0
pass_targets:
- {target: 64bit, pass: "cv64a6_imafdcv_sv39"}
Expand Down
8 changes: 5 additions & 3 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ use tokio::runtime::Runtime;

use crate::cmd;
use crate::cmd::fusesoc::FusesocArgs;
use crate::config::{Config, Manifest, Merge, PartialConfig, PrefixPaths, Validate};
use crate::config::{
Config, Manifest, Merge, PartialConfig, PrefixPaths, Validate, ValidationContext,
};
use crate::diagnostic::{Diagnostics, Warnings};
use crate::error::*;
use crate::lockfile::*;
Expand Down Expand Up @@ -426,7 +428,7 @@ pub fn read_manifest(path: &Path) -> Result<Manifest> {
partial
.prefix_paths(path.parent().unwrap())
.map_err(|cause| Error::chain(format!("Error in manifest prefixing {:?}.", path), cause))?
.validate("", false)
.validate(&ValidationContext::default())
.map_err(|cause| Error::chain(format!("Error in manifest {:?}.", path), cause))
}

Expand Down Expand Up @@ -505,7 +507,7 @@ fn load_config(from: &Path, warn_config_loaded: bool) -> Result<Config> {

// Validate the configuration.
let mut out = out
.validate("", false)
.validate(&ValidationContext::default())
.map_err(|cause| Error::chain("Invalid configuration:", cause))?;

out.overrides = out
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use tera::{Context, Tera};
use tokio::runtime::Runtime;

use crate::cmd::sources::get_passed_targets;
use crate::config::Validate;
use crate::config::{Validate, ValidationContext};
use crate::error::*;
use crate::sess::{Session, SessionIo};
use crate::src::{SourceFile, SourceGroup, SourceType};
Expand Down Expand Up @@ -301,7 +301,7 @@ pub fn run(sess: &Session, args: &ScriptArgs) -> Result<()> {
let srcs = srcs
.flatten()
.into_iter()
.map(|f| f.validate("", false))
.map(|f| f.validate(&ValidationContext::default()))
.collect::<Result<Vec<_>>>()?;

let mut tera_context = Context::new();
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/sources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use indexmap::IndexSet;
use serde_json;
use tokio::runtime::Runtime;

use crate::config::{Dependency, Validate};
use crate::config::{Dependency, Validate, ValidationContext};
use crate::error::*;
use crate::sess::{Session, SessionIo};
use crate::target::{TargetSet, TargetSpec};
Expand Down Expand Up @@ -118,7 +118,7 @@ pub fn run(sess: &Session, args: &SourcesArgs) -> Result<()> {

srcs = srcs.filter_packages(&packages).unwrap_or_default();

srcs = srcs.validate("", false)?;
srcs = srcs.validate(&ValidationContext::default())?;

let result = {
let stdout = std::io::stdout();
Expand Down
Loading
Loading