dev: deduping of simple shared code#15
Merged
Merged
Conversation
Deduping of the Any_Impl remains daunting
There was a problem hiding this comment.
Pull request overview
This PR deduplicates small shared utilities between the Ada 2012 (yeison_12) and Ada 2022 (yeison_22) crates by moving common real-handling and JSON string quoting helpers into Yeison_Utils, and then reusing them from both crates.
Changes:
- Replaced per-crate
Realsgeneric instantiations with a sharedYeison_Utils.Big_Realsinstance (and reusedReals.Negatefrom that shared instance). - Centralized JSON string quoting into
Yeison_Utils.JSON_Quoteand updated callers to use it. - Removed per-crate
Nicer_Imagefunctions (now provided fromYeison_UtilsviaYeison_Utils.Nicer_Image).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| yeison_22/src/yeison.ads | Switches Reals to a shared instance; removes local Nicer_Image. |
| yeison_22/src/yeison.adb | Uses shared Reals.Negate and Yeison_Utils.JSON_Quote instead of local helpers. |
| yeison_12/src/yeison_utils.ads | Adds shared JSON_Quote, adds General_Reals.Negate, and introduces shared Big_Reals instance. |
| yeison_12/src/yeison_12.ads | Switches Reals to a shared instance; removes local Nicer_Image. |
| yeison_12/src/yeison_12.adb | Uses shared Reals.Negate and Yeison_Utils.JSON_Quote instead of local helpers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Deduping of the Any_Impl remains daunting