Comments (17)
Thanks for the report! I will take a look shortly
from blightspell.
Hm, this should be fine.
if store.disk_read(plugin_name) == nil then
blightspell_defaults_init()
end
from blightspell.
I think I might have been able to reproduce by first installing the blightmud_mcp plugin.
Let me see if I can puzzle out what's going on here. IIRC the way I'm handling settings was heavily inspired by Lisdude's work, it's possible there's an unplanned interaction between the two.
from blightspell.
Yeah I can imagine blightmud
is running a single Lua interpreter that optimizes out duplicate loads of "the same module"
from blightspell.
Renaming settings.lua
and the require
in Blightspell did the trick.
I'll open a PR in a moment that prefixes all of the require
'd files to avoid this. This kind of thing is one of the reasons I don't particluarly love Lua ๐
from blightspell.
Confirm I now have working spell checking after /update_plugins
!
from blightspell.
Confirm I now have working spell checking after /update_plugins!
Awesome. Glad to hear it. Thanks for your help getting to the bottom of this. It was pretty mysterious.
The interpreter thinks this all plugins are in one shared source tree :( Want me to file the issue on Blightmud?
Sure, it might be helpful to at least communicate the problem exists. I suspect other plugin authors will bump into this sooner or later. Perhaps there's a fix that could be landed on that side (though I'm unlikely to have the time to pursue it myself).
from blightspell.
@abesto So far I'm not able to reproduce ๐ค
Blightmud on ๎ cpu-blightspell-6_impl [$?] is ๐ฆ v5.4.0 via ๐ฆ v1.79.0-nightly via โ๏ธ impure (nix-shell-env)
โฏ cargo build --release
<snipped>
Blightmud on ๎ cpu-blightspell-6_impl [$?] is ๐ฆ v5.4.0 via ๐ฆ v1.79.0-nightly via โ๏ธ impure (nix-shell-env)
โฏ mv ~/.config/blightmud/ ~/.config/blightmud.old
Blightmud on ๎ cpu-blightspell-6_impl [$?] is ๐ฆ v5.4.0 via ๐ฆ v1.79.0-nightly via โ๏ธ impure (nix-shell-env)
โฏ mv ~/.local/share/blightmud/ ~/.local/share/blightmud.old
โฏ ./target/release/blightmud
โWelcome
Blightmud 5.4.0 (v5.3.0-238-g6858349)
Created by: Linus Probert
Visit https://github.com/Blightmud/blightmud for latest information, bug reports and source code.
Type /connect <host> <port> to connect to a mud Type /help for more options
โโChanges
See /help changes to see what has changed in the latest major release.
> /add_plugin https://github.com/cpu/blightspell
[**] Downloading plugin: blightspell from https://github.com/cpu/blightspell
[**] Downloaded plugin: blightspell
[**] Getting the submodules for blightspell.
[**] Plugin retrieval succeeded.
> /load_plugin blightspell
[plugin] Loading: blightspell
[**] Loaded script: /home/daniel/.local/share/blightmud/plugins/blightspell/main.lua
[blightspell] spellchecking language: en
[blightspell] spellchecking enabled
Is there anything interesting in your ~/.local/share/blightmud/store/data.ron
file? Are you running this on Linux, macOS, or another platform?
from blightspell.
Huh, then it must be something in my env.
cat ~/.local/share/blightmud/store/data.ron
{"mcp_settings":"{\"lambdamoo_connect_string\":\"\\\\*\\\\*\\\\* Connected \\\\*\\\\*\\\\*\",\"simpleedit_path\":\"/home/abesto/.local/share/blightmud/plugins/blightmud_mcpsimpleedit/\",\"debug_mcp\":false,\"stat_command\":\"stat\",\"simpleedit_timeout\":10800,\"edit_command\":\"code \\\"%FILE\\\"\"}"}
This is running on Arch under WSL (I like pain, what can I say)
Tried a clean build, just in case:
$ git clone https://github.com/Blightmud/Blightmud.git
Cloning into 'Blightmud'...
--- %< ---
Resolving deltas: 100% (5834/5834), done.
$ cd blightmud
$ cargo build --release
--- %< ---
Finished `release` profile [optimized] target(s) in 2m 27s
load_plugin
then does give some useful output (I guess the build from AUR must have some optimizations enabled or something):
[!!] [Lua] Script error:
[!!] runtime error: .../.local/share/blightmud/plugins/blightspell/src/init.lua:8: attempt to index a nil value (global 'blightspell_settings')
[!!] stack traceback:
[!!] [C]: in metamethod 'index'
[!!] .../.local/share/blightmud/plugins/blightspell/src/init.lua:8: in function 'blightspell_init'
[!!] .../.local/share/blightmud/plugins/blightspell/src/init.lua:30: in main chunk
[!!] [C]: in function 'require'
[!!] [string "/home/abesto/.local/share/blightmud/plugins/b..."]:21: in main chunk
from blightspell.
At first glance: blighspell
might assume that if there's a config file, then it must also contain a blightspell
key?
from blightspell.
This is running on Arch under WSL (I like pain, what can I say)
๐
load_plugin then does give some useful output (I guess the build from AUR must have some optimizations enabled or something):
That is helpful, thank you!
At first glance: blighspell might assume that if there's a config file, then it must also contain a blightspell key?
It does seem related to the settings init, but I thought the defaults would be written if the blightspell key weren't present:
Lines 138 to 141 in b80cbe3
Edit: looks like we both arrived at that conclusion :-)
from blightspell.
Gotta check on something else, but after poking a bit, it seems like settings.lua
is not loaded at all for me? Is that possible?
from blightspell.
it seems like settings.lua is not loaded at all for me? Is that possible?
It should be loaded first in main.lua
:
Lines 17 to 21 in b80cbe3
from blightspell.
It should be loaded first in main.lua
Right, then I must be holding it wrong. I'll try again.
from blightspell.
This is weird as hell. I added debug blight.output
calls before the src/settings
require, after it, and inside the file at the top. Have output before, have output after, but don't have output inside.
from blightspell.
I wonder if it's as simple as using the same settings.lua
name and having a conflict with the require
path resolution:
https://github.com/lisdude/blightmud_mcp/blob/9661b75abbe890487c8e0daca1dcfb131c3658ca/main.lua#L9
That seems like it would match your observation of the missing output from Blightspell's src/settings
- my theory is that require
is loading the blightmud_mcp settings.lua
instead.
from blightspell.
Right, this seems like a problem with how Blightmud executes Lua then. The interpreter thinks this all plugins are in one shared source tree :( Want me to file the issue on Blightmud?
Thank you for putting in a workaround! :D
from blightspell.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blightspell.