Task: Implement Hotfix: Windows -Werror deprecated-declarations on std::getenv in compute_commands.cpp

Table of Contents

This page documents a task in the Hotfix: Windows -Werror deprecated-declarations on std::getenv in compute_commands.cpp story. It captures the goal, current status, acceptance, and any notes or results.

Goal

Fix the Windows clang-cl build failure: -Werror=deprecated-declarations on std::getenv in projects/ores.shell/src/app/commands/compute_commands.cpp:51, by replacing it with the project's ores::platform::environment::environment::get_value_or_default() helper.

Status

Field Value
State DONE
Parent story Hotfix: Windows -Werror deprecated-declarations on std::getenv in compute_commands.cpp
Now Nothing.
Waiting on Nothing.
Next Nothing.
Last touched 2026-08-03

Acceptance

Plan

(Implementation strategy. Written when work starts; key decisions are distilled into the parent story's * Decisions at close, but the plan itself stays — it is the historical record of what we did.)

Notes

Test Scenarios

Manual QA scenarios (scaffolded via compass add test_scenario, run through the QA Validation Runner panel) that verify this task. Link new ones here as they're created; the scenario doc itself links back via its "Verifies task" field.

Scenario State Notes
     

PRs

PR Title
#1810 [shell] Fix Windows -Werror=deprecated-declarations on std::getenv

Review

Comment summary File Decision Notes
       

Result

Replaced std::getenv("ORES_HTTP_PORT") in default_http_base_url() with ores::platform::environment::environment::get_value_or_default(), the same helper used to fix the equivalent Windows Clang deprecation warning in systemd_notify.cpp (commit 530a5f97b). This file was missed in that pass because it's a distinct translation unit (ores.shell/src/app/commands/compute_commands.cpp) not touched by that commit. ores.platform.lib is already a transitive PUBLIC dependency of ores.shell.lib via ores.utility.lib, so no CMakeLists change was needed. Removed the now-unused <cstdlib> include.

Confirmed no other stray std::getenv/::getenv call remains in the codebase outside ores.platform's own environment.cpp implementation.

Also confirmed while investigating: the "why aren't we building Windows/macOS" concern is by design, not a regression – continuous-windows.yml/continuous-macos.yml run on a schedule (every 12h / 3h) and on tag pushes only, not on pull_request, to avoid competing with PR CI for the shared sccache quota. Separately, the macOS CI failures observed (unrelated sockaddr_un/sun_path compile error in systemd_notify.cpp) are already fixed on main via 28fc7a975/530a5f97b; no scheduled macOS run has landed since that fix merged yet.

Emacs 29.3 (Org mode 9.6.15)