mirror of
https://github.com/openai/codex.git
synced 2026-04-25 23:24:55 +00:00
[bazel] Improve runfiles handling (#10098)
we can't use runfiles directory on Windows due to path lengths, so swap to manifest strategy. Parsing the manifest is a bit complex and the format is changing in Bazel upstream, so pull in the official Rust library (via a small hack to make it importable...) and cleanup all the associated logic to work cleanly in both bazel and cargo without extra confusion
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used)]
|
||||
use codex_utils_cargo_bin::find_resource;
|
||||
use core_test_support::responses::ev_completed;
|
||||
use core_test_support::responses::mount_sse_once_match;
|
||||
use core_test_support::responses::sse;
|
||||
@@ -11,7 +10,7 @@ use wiremock::matchers::header;
|
||||
async fn exec_uses_codex_api_key_env_var() -> anyhow::Result<()> {
|
||||
let test = test_codex_exec();
|
||||
let server = start_mock_server().await;
|
||||
let repo_root = find_resource!(".")?;
|
||||
let repo_root = codex_utils_cargo_bin::repo_root()?;
|
||||
|
||||
mount_sse_once_match(
|
||||
&server,
|
||||
|
||||
@@ -113,7 +113,7 @@ fn exec_fixture() -> anyhow::Result<std::path::PathBuf> {
|
||||
}
|
||||
|
||||
fn exec_repo_root() -> anyhow::Result<std::path::PathBuf> {
|
||||
Ok(find_resource!(".")?)
|
||||
Ok(codex_utils_cargo_bin::repo_root()?)
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user