Repository navigation
Name the main ref and the package config file as constants - #279
Merged
Merged
Conversation
`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
marked this pull request as ready for review
November 14, 2026 17:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Carries the constant refactor from a local working copy onto current master.
cas::refs::main_ref()becomespub const REF_HEAD_MAIN_FILENAME: &str = "refs/heads/main". Every caller is updated, includingdeps.rsand the CAS tests.package::config::idl::constants(CONGREGATION_EXTENSION) is removed. In its place,package::config::idlhasPACKAGE_EXTENSION(idp) andPACKAGE_CONFIG_FILENAME(config.idp).is_package_path,require_config_pathand the package_config tests use the file name directly.This breaks the public API. cli uses
main_ref()incommands/build.rs,commands/doc.rs,commands/inspect.rsandhistory.rs, and will switch when it pins this commit. The other downstream repos don't use either name.