Skip to content

Multiple fixes for broken master#26

Open
line0 wants to merge 15 commits into
masterfrom
add-missing-semver-module
Open

Multiple fixes for broken master#26
line0 wants to merge 15 commits into
masterfrom
add-missing-semver-module

Conversation

@line0
Copy link
Copy Markdown
Contributor

@line0 line0 commented May 23, 2026

This PR fixes several issues, largely caused by the incomplete refactoring some 10 years ago:

  • SemanticVersioning: this class was missing entirely and has been ported over from the sqlite branch
  • ModuleLoader: Fixed a regression where __depCtrlInit hooks were called again on - already-initialized modules, causing errors in modules that mutate their exported state on - first call (e.g., BadMutex).,
  • UpdateFeed: Fixed a regression where legacy boolean true/false script type arguments were - no longer accepted after the ScriptType enum migration.,
  • UpdateFeed: Fixed a regression where DownloadManager was instantiated too late, causing the - update process to fail.
  • Common: The 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.
  • Updater: Fixed a potential issue where a multi-assignment statement could corrupt record - fields after an unsuccessful update.

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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 SemanticVersioning and 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.

Comment thread modules/DependencyControl/UpdateFeed.moon Outdated
Comment thread modules/DependencyControl/UpdateFeed.moon Outdated
Comment thread modules/DependencyControl/SemanticVersioning.moon
Comment thread modules/DependencyControl/SemanticVersioning.moon
Comment thread modules/DependencyControl/Updater.moon Outdated
Comment thread modules/DependencyControl/ModuleLoader.moon
Comment thread modules/DependencyControl/ModuleLoader.moon Outdated
Comment thread DependencyControl.json Outdated
@line0 line0 force-pushed the add-missing-semver-module branch 2 times, most recently from 7f7ad69 to 9fee44a Compare May 23, 2026 22:10
@line0 line0 requested a review from Copilot May 23, 2026 22:10
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 15 changed files in this pull request and generated 5 comments.

Comment thread modules/DependencyControl/Updater.moon Outdated
Comment thread modules/DependencyControl/ModuleLoader.moon Outdated
Comment thread macros/l0.DependencyControl.Toolbox.moon Outdated
Comment thread macros/l0.DependencyControl.Toolbox.moon Outdated
Comment thread modules/DependencyControl/SemanticVersioning.moon Outdated
@line0 line0 force-pushed the add-missing-semver-module branch from 9fee44a to ad4a5ec Compare May 23, 2026 22:46
@line0 line0 requested a review from Copilot May 23, 2026 22:49
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 15 changed files in this pull request and generated 5 comments.

Comment thread modules/DependencyControl/ModuleLoader.moon Outdated
Comment thread modules/DependencyControl/ModuleLoader.moon Outdated
Comment thread modules/DependencyControl/ModuleLoader.moon
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
Comment thread modules/DependencyControl/Updater.moon
@line0 line0 force-pushed the add-missing-semver-module branch from ad4a5ec to 5bc3f45 Compare May 23, 2026 23:14
line0 added 2 commits May 24, 2026 08:14
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants