Skip to content

Commit

Permalink
Fix environment typo (#1410)
Browse files Browse the repository at this point in the history
  • Loading branch information
V-FEXrt authored Sep 11, 2023
1 parent 281bd04 commit 96ac59f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions share/wake/lib/system/job.wake
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ export def mkJobCacheRunner (hashFn: Result RunnerInput Error => Result String E
"wakeroot" :-> JString wakeroot,
"cwd" :-> JString dir,
"command_line" :-> JString cmd.implode,
"envrionment" :-> JString env.implode,
"environment" :-> JString env.implode,
"stdin" :-> JString stdin,
"input_files" :-> jobCacheVisible,
"client_cwd" :-> JString workspace,
Expand Down Expand Up @@ -503,7 +503,7 @@ export def mkJobCacheRunner (hashFn: Result RunnerInput Error => Result String E
"wakeroot" :-> JString wakeroot,
"cwd" :-> JString dir,
"command_line" :-> JString cmd.implode,
"envrionment" :-> JString env.implode,
"environment" :-> JString env.implode,
"stdin" :-> JString stdin,
"runner_hash" :-> JString hashKey,
"input_files" :-> jobCacheReadFiles,
Expand Down
4 changes: 2 additions & 2 deletions src/job_cache/daemon_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ class SelectMatchingJobs {
auto defer_reset = wcl::make_defer([this]() { find_jobs.reset(); });
find_jobs.bind_string(1, find_job_request.cwd);
find_jobs.bind_string(2, find_job_request.command_line);
find_jobs.bind_string(3, find_job_request.envrionment);
find_jobs.bind_string(3, find_job_request.environment);
find_jobs.bind_string(4, find_job_request.stdin_str);
find_jobs.bind_string(6, find_job_request.runner_hash);

Expand Down Expand Up @@ -1019,7 +1019,7 @@ void DaemonCache::add(const AddJobRequest &add_request) {
int64_t job_id;
{
impl->transact.run([this, &add_request, &job_id]() {
job_id = impl->jobs.insert(add_request.cwd, add_request.command_line, add_request.envrionment,
job_id = impl->jobs.insert(add_request.cwd, add_request.command_line, add_request.environment,
add_request.stdin_str, add_request.bloom, add_request.runner_hash);

// Add additional info
Expand Down
10 changes: 5 additions & 5 deletions src/job_cache/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ AddJobRequest AddJobRequest::from_implicit(const JAST &json) {
req.cwd = wcl::join_paths(req.wakeroot, req.cwd);
}
req.command_line = json.get("command_line").value;
req.envrionment = json.get("envrionment").value;
req.environment = json.get("environment").value;
req.stdin_str = json.get("stdin").value;
req.runner_hash = json.get("runner_hash").value;
req.stdout_str = json.get("stdout").value;
Expand Down Expand Up @@ -435,7 +435,7 @@ AddJobRequest::AddJobRequest(const JAST &json) {
cwd = wcl::join_paths(wakeroot, cwd);
}
command_line = json.get("command_line").value;
envrionment = json.get("envrionment").value;
environment = json.get("environment").value;
stdin_str = json.get("stdin").value;
stdout_str = json.get("stdout").value;
stderr_str = json.get("stderr").value;
Expand Down Expand Up @@ -512,7 +512,7 @@ JAST AddJobRequest::to_json() const {
json.add("wakeroot", wakeroot);
json.add("cwd", cwd);
json.add("command_line", command_line);
json.add("envrionment", envrionment);
json.add("environment", environment);
json.add("stdin", stdin_str);
json.add("stdout", stdout_str);
json.add("stderr", stderr_str);
Expand Down Expand Up @@ -570,7 +570,7 @@ FindJobRequest::FindJobRequest(const JAST &find_job_json) {
cwd = wcl::join_paths(wakeroot, cwd);
}
command_line = find_job_json.get("command_line").value;
envrionment = find_job_json.get("envrionment").value;
environment = find_job_json.get("environment").value;
stdin_str = find_job_json.get("stdin").value;
client_cwd = find_job_json.get("client_cwd").value;
runner_hash = find_job_json.get("runner_hash").value;
Expand Down Expand Up @@ -638,7 +638,7 @@ JAST FindJobRequest::to_json() const {
json.add("wakeroot", wakeroot);
json.add("cwd", cwd);
json.add("command_line", command_line);
json.add("envrionment", envrionment);
json.add("environment", environment);
json.add("stdin", stdin_str);
json.add("client_cwd", client_cwd);

Expand Down
4 changes: 2 additions & 2 deletions src/job_cache/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ struct FindJobRequest {
std::string wakeroot;
std::string cwd;
std::string command_line;
std::string envrionment;
std::string environment;
std::string stdin_str;
wcl::trie<std::string, std::string> dir_redirects;
BloomFilter bloom;
Expand Down Expand Up @@ -184,7 +184,7 @@ struct AddJobRequest {
std::string wakeroot;
std::string cwd;
std::string command_line;
std::string envrionment;
std::string environment;
std::string stdin_str;
BloomFilter bloom;
std::string runner_hash;
Expand Down
4 changes: 2 additions & 2 deletions tools/wake-unit/fuzz_test_job_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ struct TestJob {
request.add("wakeroot", cwd);
request.add("cwd", ".");
request.add("command_line", cmd);
request.add("envrionment", env);
request.add("environment", env);
request.add("stdin", stdin);
// TODO: add options for stdout and stderr
// and check them in the test
Expand Down Expand Up @@ -132,7 +132,7 @@ struct TestJob {
request.add("wakeroot", cwd);
request.add("cwd", ".");
request.add("command_line", cmd);
request.add("envrionment", env);
request.add("environment", env);
request.add("stdin", stdin);

char path_buf[4096];
Expand Down

0 comments on commit 96ac59f

Please sign in to comment.