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
25 changes: 25 additions & 0 deletions references/1c/confirmed-runtime-measurements.md
Original file line number Diff line number Diff line change
Expand Up @@ -2304,6 +2304,31 @@ ibcmd infobase --data <W>/m/data2 --db-path <W>/m/ib2 config import --out=<W>/m/
Конфигуратор работает в базе, созданной `ibcmd`, поэтому внешние наборы можно собирать и в
ней.

### `make` с пробелом в пути к базе сборки на Windows (#848)

01.12.2026, Windows x64, Конфигуратор 8.5.1.1529. Синтетический проект
`C:\tmp\v8-issue-848\Тестовый проект` содержал конфигурацию и расширение
`Probe848` в формате DESIGNER. Выбран `providers.make: designer`.
С `workPath` по умолчанию база создавалась в `.build/v8-runner/temp/build-infobase/ib`.

До исправления оба вызова `make` завершились кодом 4 (`platform_failure`):
`CREATEINFOBASE` создал базу, а `/LoadConfigFromFiles` для `main` получил
`/IBConnectionString File=<путь с пробелом>`. Конфигуратор вернул 1 и
«Неопределена информационная база». Контроль тех же исходников и команд
с абсолютным `workPath` без пробелов дал код 0 для обоих пакетов.

После передачи пути отдельным аргументом `/F` обе команды в том же проекте
с `workPath` по умолчанию завершились кодом 0. В квитанциях выбран `designer`.
Пакеты CF и CFE имели размер 75 431 и 4 008 байт соответственно.

```powershell
v8-runner --json-message make main --output out/after.cf
v8-runner --json-message make Probe848 --extension Probe848 --output out/after.cfe
```

Повтор `make Probe848 --extension Probe848 --full --output out/after-fresh.cfe`
с заново созданной сборочной базой также опубликовал CFE (4 008 байт).

## Признаки «есть непринятое» и «обновлено динамически»

Замер 07.10.2026. Задача: [#412](https://github.com/IngvarConsulting/v8-runner-rust/issues/412).
Expand Down
43 changes: 29 additions & 14 deletions src/use_cases/artifacts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2232,9 +2232,7 @@ fi"#;
DumpEffect::TouchDatabase | DumpEffect::ResizeDatabase
) && after(&request.args, "/DumpCfg").is_some()
{
let database = after(&request.args, "/IBConnectionString")
.and_then(|argument| argument.strip_prefix("File="))
.expect("database path");
let database = designer_database_path(&request.args).expect("database path");
let file = fs::File::options()
.write(true)
.open(Path::new(database).join("1Cv8.1CD"))
Expand Down Expand Up @@ -2337,6 +2335,10 @@ fi"#;
.map(String::as_str)
}

fn designer_database_path(call: &[String]) -> Option<&str> {
after(call, "/F").or_else(|| after(call, "/IBConnectionString")?.strip_prefix("File="))
}

fn project(dir: &Path) -> (AppConfig, PathBuf) {
let base = dir.join("base");
let work = dir.join("work");
Expand Down Expand Up @@ -2382,11 +2384,8 @@ fi"#;
.expect("address");
assert!(address.contains(&root.display().to_string()), "{address}");
assert!(!address.contains("/tmp/ib"), "{address}");
let connection = after(&calls[1], "/IBConnectionString").expect("connection");
assert!(
connection.contains(&root.display().to_string()),
"{connection}"
);
let database = designer_database_path(&calls[1]).expect("Designer database path");
assert_eq!(Path::new(database), root.join("ib"));
assert_eq!(
after(&calls[1], "/LoadConfigFromFiles"),
Some(
Expand Down Expand Up @@ -2654,11 +2653,12 @@ fi"#;
}

/// Основная конфигурация попадает в базу прогона один раз: следующее расширение
/// загружается поверх неё без повторной загрузки.
/// загружается поверх неё без повторной загрузки. При пробеле в workPath
/// каждый запуск Конфигуратора после создания базы получает путь через `/F`.
#[test]
fn one_base_serves_every_package_of_a_run() {
fn one_spaced_build_infobase_serves_cf_and_cfe() {
let dir = tempdir().expect("tempdir");
let (config, _work) = project(dir.path());
let (config, work) = project(&dir.path().join("spaced project"));
let runner = Recorder::new();
let context = ExecutionContext::cli(CommandName::Artifacts);
let mut base = BuildSession::default();
Expand Down Expand Up @@ -2692,6 +2692,21 @@ fi"#;
assert_eq!(created, 1, "{calls:?}");
assert_eq!(configuration_loads, 1, "{calls:?}");
assert_eq!(calls.len(), 5, "{calls:?}");
let database = build_root(&work).join("ib");
let database = database.to_str().expect("UTF-8 test path");
// Creation uses a connection string. Opening the base uses a path argument.
let create_address = format!("File='{}'", database.replace('\'', "''"));
assert_eq!(
after(&calls[0], "CREATEINFOBASE"),
Some(create_address.as_str())
);
for call in &calls[1..] {
assert_eq!(after(call, "/F"), Some(database), "{call:?}");
assert!(
!call.iter().any(|arg| arg == "/IBConnectionString"),
"{call:?}"
);
}
}

#[test]
Expand Down Expand Up @@ -3182,9 +3197,9 @@ fi"#;
.to_owned();
let external_call = position(&calls, "/LoadExternalDataProcessorOrReportFromFiles");
assert_eq!(external_call.len(), 1, "{calls:?}");
let connection =
after(&calls[external_call[0]], "/IBConnectionString").expect("Designer connection");
assert!(connection.contains(&ibcmd_base), "{connection}");
let designer_base =
designer_database_path(&calls[external_call[0]]).expect("Designer database path");
assert_eq!(designer_base, ibcmd_base);
assert!(position(&calls, "CREATEINFOBASE").is_empty(), "{calls:?}");
assert!(
position(&calls, "/LoadConfigFromFiles").is_empty(),
Expand Down
4 changes: 3 additions & 1 deletion src/use_cases/throwaway_infobase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,9 @@ impl FileInfobase {
}

pub(crate) fn connection(&self) -> V8Connection {
V8Connection::for_file(&self.database_path())
let mut connection = V8Connection::for_file(&self.database_path());
connection.use_file_arg_for_spaced_path();
connection
}

pub(crate) fn create(
Expand Down
Loading