earendil-works/pi · error

Deprecation warning

Error message

Deprecation warning: ${message}

What it means

Not an exception: the deprecation-warning format used by warnDeprecation, which prints a yellow-highlighted warning to stderr once per unique message (tracked in a module-level set to avoid spam). It signals the calling code path is deprecated and should be migrated; execution continues normally afterwards.

Solutions

  1. A deprecated feature is in use; migrate as the warning message indicates.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at packages/coding-agent/src/utils/deprecation.ts:8 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of earendil-works/pi@4af9d21d3b (2026-08-24). Data as JSON: /api/errors/1d475120421c0cc1. Report an issue: GitHub.

Appendix: source

Thrown at packages/coding-agent/src/utils/deprecation.ts:8

import chalk from "chalk";

const emittedDeprecationWarnings = new Set<string>();

export function warnDeprecation(message: string): void {
	if (emittedDeprecationWarnings.has(message)) return;
	emittedDeprecationWarnings.add(message);
	console.warn(chalk.yellow(`Deprecation warning: ${message}`));
}

/** Clear deprecation warning state. Exported for tests. */
export function clearDeprecationWarningsForTests(): void {
	emittedDeprecationWarnings.clear();
}

View on GitHub (pinned to 4af9d21d3b)