refactor(linux): split phpvm.sh into linux/src modules built by build.sh - #33
Merged
Conversation
phpvm.sh reaches 1914 lines while its Windows twin has been modular since 1.13.0. Mirror that split: 16 modules in linux/src/, concatenated back into the single shipped phpvm.sh by build.sh, with a --check drift gate in CI. Distribution is unchanged - install.sh and `phpvm upgrade` still fetch one raw file, which is why this concatenates at build time rather than sourcing modules at load time. Unlike PowerShell, bash resolves function bodies at call time, so only the ends of the file are load-bearing: constants first, source-time init last. The modules in between are ordered for readability. Pure move - verified by comparing the multiset of non-blank lines against the previous phpvm.sh (1680 == 1680). Bump 1.14.0 -> 1.15.0. devhardiyanto
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.
What
linux/phpvm.sh(1914 baris) dipecah jadi 16 modul dilinux/src/, digabung balik jadi satu file terkirim olehbuild.shbaru. Mirror pola B8 yang sudah jalan di Windows sejak 1.13.0. Bump 1.14.0 → 1.15.0.Why
Sejak paritas v1.14.0,
phpvm.shjustru lebih besar dari file Windows yang generated. Satu file 1914 baris bikin tiap perubahan harus di-scroll dulu; sisi Windows sudah membuktikan modul + drift gate = ongkos rendah, bukan utang.How
sourceper-modul:install.shdanphpvm upgrademenarik satu file mentah dariraw.githubusercontent/.../main/linux/phpvm.sh— multi-file akan memecah model distribusi dan menghilangkan atomicityupgrade. Alasannya identik dengan Windows.00-header.sh) di depan, blok init source-time (99-entry.sh) di akhir. Modul di antaranya disusun murni demi keterbacaan.20-os,25-openssl,30-deps,35-buildlog) muncul karena Linux build-from-source; Windows punya35-cacertyang Linux tak butuh.Changes
linux/src/*.sh— 16 modul (00-header…99-entry)build.sh(root) — concat +--checkuntuk drift;linux/phpvm.shjadi generated (bannerDO NOT EDIT+ penanda# --- src/<modul>per modul).github/workflows/ci.yml— stepbash ./build.sh --checksebelum ShellCheckREADME.md— section Development mencakup dua build (Windows + Linux)version.txt,linux/install.sh,linux/src/00-header.sh,windows/install.ps1,windows/src/00-header.ps1+ dua file generatedTesting Done
phpvm.shsebelumnya → 1680 == 1680, diff kosong. (Byte-per-byte tak dipakai karena modul memang menyusun ulang urutan fungsi.)bash ./build.sh --check+pwsh ./build.ps1 -CheckOK ·bash -n+zsh -nOKzshdi CI ubuntu.