Repository navigation
Stage 2: editor split into one file per screen, more tests - #1
Merged
Merged
Conversation
OpenCoreEditor.c had every screen in 4775 lines. It is now: - OpenCoreEditor.c: shared helpers, reading and writing config.plist, the main menu, the entry point - OpenCoreEditorBootArgs.c: boot-args and boot flags - OpenCoreEditorBrowser.c: the config.plist tree - OpenCoreEditorLists.c: kexts, drivers, ACPI, tools and the other on/off lists - OpenCoreEditorQuirks.c: quirks - OpenCoreEditorText.c: log, kernel panic, config check, comparing configs - OpenCoreEditorConfigs.c: config files and putting the backup back - OpenCoreEditorPrivate.h: the types and functions they share No code changed: every line of the old file is in one of the new ones, checked line by line. The only edits are STATIC dropped from the 30 functions and 6 tables used by more than one file.
- The fake console of TestPickerEditor can be any size up to 240x67 (what BuiltinGraphics makes on a 1080p screen). Every screen of the main menu is opened at 80x25, 100x30, 128x40 and 240x67; the harness fails if anything is written to the last column or row or the console scrolls. - A 700 character comment in the kexts list and the config tree, at 80x25 and 240x67, and a config file with the longest name allowed, in the chooser and chosen. - Four broken config.plist files (empty, not a plist, cut short, wrong root) against every screen that reads or saves the config: none crashes, and nothing is written. - With PICKER_TEST_SCREENS=<dir> the harness keeps each screen as text; render-screen.swift takes the console size. - A failed ASSERT of the libraries is printed on the host as well. 1669 checks, 0 failures, plain and with SANITIZE=1. DrogaBox/WRITES.md goes through what each save writes and what a power cut would leave.
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.
Stage 2 of the plan: the editor's insides, with nothing you see changed.
OpenCoreEditor.c(4775 lines) is now seven files, one per screen, plusOpenCoreEditorPrivate.h. Every line of code is where it was before, checked line by line; the only edits areSTATICdropped from what more than one file uses.DrogaBox/WRITES.md: what each save writes and what a power cut would leave. Saving config.plist has a gap (cut between deleting the old file and finishing the new one = no config at the next start); the fix is proposed there, not done.The full EDK2 build (X64 RELEASE and DEBUG) compiles with no warnings.