Skip to content

Fix packages not behaving as same as modules#7729

Merged
vadi2 merged 3 commits intoMudlet:developmentfrom
Arian8j2:package-behave
Mar 31, 2025
Merged

Fix packages not behaving as same as modules#7729
vadi2 merged 3 commits intoMudlet:developmentfrom
Arian8j2:package-behave

Conversation

@Arian8j2
Copy link
Copy Markdown
Contributor

@Arian8j2 Arian8j2 commented Feb 19, 2025

Brief overview of PR changes/additions

Fix issue compiling children scripts more than enough and also out of order.

Motivation for adding to Mudlet

Show same error message when using as a module or package.

Other info (issues closed, discussion etc)

fixes #6460
/claim #6460

@add-deployment-links
Copy link
Copy Markdown

add-deployment-links bot commented Feb 19, 2025

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

@Arian8j2 Arian8j2 marked this pull request as ready for review February 19, 2025 08:22
@Arian8j2 Arian8j2 requested a review from a team as a code owner February 19, 2025 08:22
@Arian8j2
Copy link
Copy Markdown
Contributor Author

@vadi2 Also while debugging this i found out some logs are not shown in the main console, For example if you run mudlet with --mirror you will see some logs that are not shown and also if you add the mudlet-mapper - Copy.zip as module or package sometimes the script error will not shown in console although the stdout shows the errors, Is this expected?

@Arian8j2
Copy link
Copy Markdown
Contributor Author

@vadi2 Also while debugging this i found out some logs are not shown in the main console, For example if you run mudlet with --mirror you will see some logs that are not shown and also if you add the mudlet-mapper - Copy.zip as module or package sometimes the script error will not shown in console although the stdout shows the errors, Is this expected?

Found the issue, It's because of condenseMapLoad not detecting lua error logs as errors:

diff --git a/src/mudlet-lua/lua/Other.lua b/src/mudlet-lua/lua/Other.lua
index 9d7ec2c9..9b28b4b4 100644
--- a/src/mudlet-lua/lua/Other.lua
+++ b/src/mudlet-lua/lua/Other.lua
@@ -784,7 +784,7 @@ function condenseMapLoad()
   for i = 1, 30 do
     moveCursor(0, getLineCount() - i)
     local line = getCurrentLine()
-    if line:find("ALERT") or line:find("WARN") or line:find("ERROR") then
+    if line:find("ALERT") or line:find("WARN") or line:find("ERROR") or line:find("LUA") then
       return nil, "an alert, warning, or error that the user must see is present"
     elseif startswith(line, "[ INFO ]  - Reading map") then
       linestodelete = i

This patch would fix it, Do i include this in this pr or create another pr for it?

@Arian8j2
Copy link
Copy Markdown
Contributor Author

Arian8j2 commented Mar 1, 2025

@vadi2 kindly reminder to review :)

@vadi2
Copy link
Copy Markdown
Member

vadi2 commented Mar 4, 2025

I don't have a lot of bandwidth to review this... @demonnic or @ZookaOnGit ?

@Arian8j2
Copy link
Copy Markdown
Contributor Author

Hello, Any update on this?

@ZookaOnGit
Copy link
Copy Markdown
Contributor

I will take a look. Fixed initial post to reflect template, please follow in the future.

@ZookaOnGit
Copy link
Copy Markdown
Contributor

Installed as package, get ladybug every time (which is actually what we are after) after profile restart, same behavior exhibited as module install. From a user perspective this seems fixed.

Copy link
Copy Markdown
Member

@vadi2 vadi2 left a comment

Choose a reason for hiding this comment

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

Thanks so much

@vadi2 vadi2 merged commit 6ce7f35 into Mudlet:development Mar 31, 2025
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mudlet package behaving as though things are there which should not be. Module does not do this.

3 participants