Skip to content

Name the main ref and the package config file as constants - #279

Merged
Kinflou merged 1 commit into
masterfrom
refactor/ref-and-config-consts
Nov 14, 2026
Merged

Kinflou merged 1 commit into
masterfrom
refactor/ref-and-config-consts

Conversation

@Kinflou

@Kinflou Kinflou commented Nov 14, 2026

Copy link
Copy Markdown
Member

Carries the constant refactor from a local working copy onto current master.

  • cas::refs::main_ref() becomes pub const REF_HEAD_MAIN_FILENAME: &str = "refs/heads/main". Every caller is updated, including deps.rs and the CAS tests.
  • package::config::idl::constants (CONGREGATION_EXTENSION) is removed. In its place, package::config::idl has PACKAGE_EXTENSION (idp) and PACKAGE_CONFIG_FILENAME (config.idp). is_package_path, require_config_path and the package_config tests use the file name directly.

This breaks the public API. cli uses main_ref() in commands/build.rs, commands/doc.rs, commands/inspect.rs and history.rs, and will switch when it pins this commit. The other downstream repos don't use either name.

`refs::main_ref()` becomes the constant `REF_HEAD_MAIN_FILENAME`, and
`config::idl::constants::CONGREGATION_EXTENSION` gives way to
`config::idl::PACKAGE_EXTENSION` and `PACKAGE_CONFIG_FILENAME`
(`config.idp`), so callers no longer format the file name themselves.
The `constants` module, which held only that one item, is removed.

This changes core's public API: the CLI uses `main_ref()` and moves to
the constant when it next pins core.
@Kinflou
Kinflou marked this pull request as ready for review November 14, 2026 17:39
@Kinflou
Kinflou merged commit 06b74cb into master Nov 14, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant