Comments (8)
This happens because another clink completion packages was installed which also defined a tables.lua
module in the global namespace. So maybe it might be a good idea to register the files under modules
via a dedicated namespace.
from clink-completions.
This happens because another clink completion packages was installed which also defined a
tables.lua
module in the global namespace. So maybe it might be a good idea to register the files undermodules
via a dedicated namespace.
It looks like there are two copies of clink-completions installed.
One in "...clink\clink-completions".
And one in "C:\apps\tools\clink-completions".
Can you clarify how you would register files under dedicated namespaces in Lua? I don't understand how one would do that in Lua.
from clink-completions.
It looks like there are two copies of clink-completions installed.
No, I shortened the path when creating the issue. There is only one installation.
Can you clarify how you would register files under dedicated namespaces in Lua? I don't understand how one would do that in Lua.
I fixed it like this on the other end: sebthom/more-clink-completions@d8d9ce5
So you basically create a subfolder in modules
, e.g. clink_completions
or something else and then reference the modules like require("clink_completions.tables")
instead of require("tables")
from clink-completions.
Oh, I see. That's no different than simply renaming modules
to clink_completions_modules
. It isn't a "namespace" per se, it just uses a more unique directory name than "modules". I'm cautious about making that change in clink-completions
itself, since it is a breaking change that can lead to breaking other scripts and breaking clink-completions itself if someone updates it by unzipping the .zip file.
What is the other clink completions package that has a modules\tables.lua
script, but is not the clink-completions
package?
from clink-completions.
Oh, I see. That's no different than simply renaming
modules
toclink_completions_modules
.
This would not solve the problem as the tables
module will still be registered at top-level. If you however introduce a subdirectory but continue to put the parent dir, i.e. modules
on the lua path, then you can reference the tables module in a qualified way.
What is the other clink completions package that has a
modules\tables.lua
script, but is not theclink-completions
package?
Mine :) https://github.com/sebthom/more-clink-completions/ and I mitigated the issue from my side via sebthom/more-clink-completions@d8d9ce5
from clink-completions.
@sebthom ahhh ok I see, now, thanks for explaining.
At this point it would be a breaking change, and I'm cautious about making those, since they tend to be disruptive and result in frustration and lost time for people (including myself, to answer questions and troubleshoot, etc).
But I'm still a little confused:
It sounds like your more-clink-completions may be similar to clink-completions. But it has a tables.lua
module in a different module directory, and its different module isn't a copy and works differently? I'd have imagined it would either copy tables.lua
or use a different module name if it knew the module name conflicted. Which I suppose is the point -- the conflict wasn't originally noticed.
from clink-completions.
Well, I don't know but my repo used to work in conjunction with clink-completions with no problems, after installing a new version of clink-completions without having modified my repo I got the error described. Maybe because of this change 2ae1083
The tables.lua I created is different, it is not a copy.
from clink-completions.
Well, I don't know but my repo used to work in conjunction with clink-completions with no problems, after installing a new version of clink-completions without having modified my repo I got the error described. Maybe because of this change 2ae1083
The tables.lua I created is different, it is not a copy.
How would it be related to that commit? That commit didn't change anything about the modules path. It only refactored a line so that it could reuse the parent path, instead of computing the parent path twice.
Oh, I get it -- You mentioned using clink installscripts
as the way you installed a new version of clink-completions.
That's the cause. Previously clink installscripts
must not have been used to install it. The installscripts locations are loaded after all other scripts have been loaded. So git.lua
from an installscripts directory ends up loading the tables.lua
module from your other scripts.
Which also means that in the past, your scripts must have been accidentally loading the clink-completions copy of tables.lua
instead of their own copy?
from clink-completions.
Related Issues (20)
- Unwanted behaviour for `adb` and `scrcpy` completions. HOT 6
- Run git pull on script folders after update HOT 3
- Error when completing ssh HOT 3
- Improve winget completion HOT 9
- openssl.lua:1179: attempt to compare number with string HOT 1
- Error "module 'path' not found" on fresh install. HOT 8
- Sudo Clink version mismatch HOT 6
- Winget completion throws error HOT 8
- Completion for Nuke.Build HOT 12
- git add completions are git root relative instead of cwd relative HOT 2
- Git add tries to add already added (renamed/moved) file HOT 2
- RFE: add completions for ping HOT 10
- Bug: completions from known_hosts for ssh and ping on non-default port HOT 5
- The new git_prompt.lua in 0.4.9 breaks custom non-cmder prompt HOT 6
- Add completions for arduino-cli HOT 1
- How to let 'git add' completion non-recursive HOT 7
- Add completions for go and rust tools
- Test error HOT 7
- Update docs HOT 2
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 clink-completions.