Document Chronicle Values requirements and harden generator utilities#166
Open
peter-lawrey wants to merge 4 commits intodevelopfrom
Open
Document Chronicle Values requirements and harden generator utilities#166peter-lawrey wants to merge 4 commits intodevelopfrom
peter-lawrey wants to merge 4 commits intodevelopfrom
Conversation
|
james-mcsherry
approved these changes
Nov 25, 2025
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.



This PR refines contributor guidance for AI agents, restructures Chronicle Values documentation into
src/main/docs, bumps the shared dependency BOM, and tightens several code generation utilities used by Chronicle Values. It also clarifies how to run builds and where to find system properties and decision records.Functional changes
Generated implementations now include
toString()Generators.generateValueCommons(...)now always addstoStringMethod(...)for both native and heap implementations.Object.toString().Stronger null handling in array field model
ArrayFieldModelconstructor now usesObjects.requireNonNull(elemModel).NullPointerExceptionif an invalid configuration is passed, instead of leaking a null further into layout calculations.More precise exception types from reflection utilities
Enums.getUniverse(...)now throwsIllegalStateException("Unable to access enum constants", e)rather than a genericRuntimeException.MyJavaFileManager.classFileObject(...)now throwsIllegalStateException("Unable to resolve class URI for " + c.getName(), e)instead of a bareRuntimeException.Deterministic encoding for generated source output
SimpleURIClassObject.openWriter()now usesnew OutputStreamWriter(openOutputStream(), StandardCharsets.UTF_8).Locale-independent uppercasing
PrimitiveBackedHeapMemberGeneratornow usesfieldType.getName().toUpperCase(Locale.ROOT)instead oftoUpperCase()with the default locale.Dependency set updated via BOM
pom.xmlupdatesnet.openhft:third-party-bomfrom3.27ea5to3.27ea7.Non-functional changes
Agent and contributor guidance (AGENTS.md)
Language and charset policy updated:
Adds a note on tools to check for non-ASCII characters, including
iconvand IDE settings to catch stray Unicode before code review.Expands Javadoc and inline comment guidelines with concrete examples:
Clarifies build instructions:
mvn -q clean verifyfrom a clean checkout and notes that exit code0indicates success.PR etiquette extended:
Subject line advice kept, but quotes removed from the example to keep subject wording copy-paste friendly.
New "When to open a PR" section emphasising:
mvn -q clean verify.Adds a Security checklist section to review on every change:
.adocfiles.Documentation structure and attributes
Moves requirement and decision documentation under
src/main/docs:src/main/adoc/project-requirements.adocrenamed tosrc/main/docs/project-requirements.adoc.Old
src/main/adoc/decision-log.adocremoved.New
src/main/docs/decision-log.adocintroduced with a structured Chronicle Values decision log:VAL-FN-101,VAL-NFP-111,VAL-SPOT-301) with context, rationale, impact and links.project-requirements.adocnow includes::toc:,:lang: en-GB,:sectnums:and:source-highlighter: rougeattributes.New
src/main/docs/functional-requirements.adoc:CV-FN-001 .. CV-FN-008and groups them into domains.CV-FN-*tags.New
src/main/docs/systemProperties.adoc:chronicle.values.dumpCode.-Dand notes Chronicle Boolean parsing conventions (for example empty value,trueoryes).chronicle.values.dumpCodecontrols printing of generated Java source for native and heap implementations during code generation and is intended for debugging, not normal production use.README header (
README.adoc) updated::lang: en-GBand:source-highlighter: rougeto align with the rest of the documentation set.AsciiDoc style and formatting clean-ups
AGENTS.md:Decision template:
Decision Statement ::to be a single line entry.section :: ...).:sectnums:and avoiding manual numbering in headings.Test and comment clean-ups
VolatileTest:testGenerateJavaCodesignature to no longer declare unused checked exceptions.PointerTest:System.setProperty("chronicle.values.dumpCode", "true");line to reduce noise.MyJavaFileManager:Minor style and readability improvements
ValueModel:CACHED_COMPILER.fileManagerOverrideassignment over two lines for clarity.BooleanFieldModel:BooleanHeapMemberGeneratorinner class, making heap generator responsibilities more explicit while retaining the same behaviour.FloatingFieldModel:"%n"rather than hardcoded"\n"in generated equality methods, ensuring platform-appropriate line separators in generated code.Utils:java.util.Localeimport for use in locale-safe helpers.Impact and migration notes
toString()implementation. This should mostly aid debugging and logging, but any tests asserting on the previous defaultObject.toString()format may need to be updated.RuntimeExceptiontoIllegalStateExceptionwith richer messages. Callers that explicitly check exception types should be reviewed.third-party-bom:3.27ea7aligns this module with the latest shared dependency set; downstream projects should be retested, especially where SLF4J / logging behaviour or other third-party versions are sensitive.src/main/docsfor Chronicle Values requirements, decision logs and system property definitions; links from code and other docs have been updated accordingly.