Multiple fixes for broken master#26
Open
line0 wants to merge 15 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to restore a working “master” by reintroducing missing version-handling functionality, fixing several regressions in module loading and update/feed handling, and adding initial unit-test and line-ending consistency infrastructure.
Changes:
- Added
SemanticVersioningand migrated version parsing/formatting to use it across updater/feed paths. - Fixed/adjusted updater + module-loader behaviors related to initialization and update flows, and added a minimal DepCtrl unit test.
- Updated the project update feed metadata, bumped versions, and enforced LF + final newline consistency.
Reviewed changes
Copilot reviewed 12 out of 15 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/DependencyControl/Updater.moon | Migrates updater version handling to SemanticVersioning and adjusts update logging/changelog display. |
| modules/DependencyControl/UpdateFeed.moon | Adds legacy scriptType compatibility + new invalid scriptType messaging; moves DownloadManager init earlier. |
| modules/DependencyControl/UnitTestSuite.moon | No functional change (newline normalization). |
| modules/DependencyControl/Tests.moon | Adds a first unit test for Common.terms.capitalize. |
| modules/DependencyControl/SemanticVersioning.moon | Introduces semantic version parsing/formatting/comparison utilities. |
| modules/DependencyControl/Record.moon | Switches record version parsing to SemanticVersioning and adds compatibility helpers. |
| modules/DependencyControl/ModuleLoader.moon | Updates init-hook guard logic and switches version formatting/parsing to SemanticVersioning. |
| modules/DependencyControl/FileOps.moon | No functional change (newline normalization). |
| modules/DependencyControl/ConfigHandler.moon | No functional change (newline normalization). |
| modules/DependencyControl/Common.moon | Fixes capitalize() implementation to avoid unsupported string indexing. |
| modules/DependencyControl.moon | Bumps DepCtrl version, exposes SemanticVersioning, and adds a Moonscript minimum-version guard. |
| macros/l0.DependencyControl.Toolbox.moon | Bumps toolbox version; updates version formatting and script-type handling; registers DepCtrl test suite. |
| DependencyControl.json | Updates feed versions/hashes and adds new files (including tests) to the module feed. |
| .vscode/settings.json | Enforces final newline on save in VS Code. |
| .gitattributes | Enforces LF line endings in git. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7f7ad69 to
9fee44a
Compare
9fee44a to
ad4a5ec
Compare
Comment on lines
+57
to
64
| maxVer = SemanticVersioning\toNumber @version | ||
| minVer = SemanticVersioning\toNumber minVer | ||
|
|
||
| changelog = {} | ||
| for ver, entry in pairs @changelog | ||
| ver = DependencyControl\parseVersion ver | ||
| verStr = DependencyControl\getVersionString ver | ||
| ver = SemanticVersioning\toNumber ver | ||
| verStr = SemanticVersioning\toString ver | ||
| if ver >= minVer and ver <= maxVer |
number segments over 255 and non-dot separate values
…r string is passed
ad4a5ec to
5bc3f45
Compare
nothing inside DepCtrl is supplying this parameter, so the only effect this bug would have had, is removing the default guard against modules trying to load themselves
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 fixes several issues, largely caused by the incomplete refactoring some 10 years ago:
__depCtrlInithooks were called again on - already-initialized modules, causing errors in modules that mutate their exported state on - first call (e.g., BadMutex).,true/falsescript type arguments were - no longer accepted after theScriptTypeenum migration.,DownloadManagerwas instantiated too late, causing the - update process to fail.capitalize()function no longer uses unsupported string indexing and now works - for the first time ever. Before the refactor, this was previously masked by it not actually - being called anywhere.Additionally, i have added a unit test suite for DepCtrl (only 1 tiny test for now) and made all files use LF + EOF Newline to ensure consistent file hashes.