Comments (8)
Starting work on this...
Personally, I like the idea of generating a rockspec.
On second thought, this could potentially lead to conflicts with luarocks installations.
I will stick with packages.
from rocks.nvim.
this feature would definitely help more users migrate to this plugin manager.
and how does this module behave when there are two plugins depend on a same git repository, but with different versions/tags/branches?
for example now I have two plugins:
linrongbin16/fzfx.nvim
linrongbin16/gitlinker.nvim
they all rely on a dependency:
linrongbin16/commons.nvim
with different version 1.6.*
and 2.*
.
(actually I had upload the commons.nvim
to luarocks, but) what if the dependency is not upload to luarocks?
can rocks.nvim support isolated versions on the same dependency?
from rocks.nvim.
Some things to consider:
- Do we want to use packages (type =
opt
|start
, like minpac, paq, ...)? - Or should we use a rockspec template to generate a simple rockspec (like we do with luarocks-tag-release) and hook into the rocks install?
- Or both (type =
opt
|start
|rock
)?
Personally, I like the idea of generating a rockspec.
from rocks.nvim.
and how does this module behave when there are two plugins depend on a same git repository, but with different versions/tags/branches?
I think dependeny management should be outside the scope of this module.
The point of rocks.nvim is to take away that burden from the user and make it the plugin authors' responsibility.
So we just need to rigourously package plugins that have dependencies (there's not that many at this point) for luarocks, so they can be installed without the rocks-git module.
from rocks.nvim.
can rocks.nvim support isolated versions on the same dependency?
luarocks can install different versions of the same package, but I don't know at this point if it causes issues at runtime. My guess would be that a require
will load the first module it finds on the path, which indeed would be an issue.
I don't know if luarocks reports on that though...
We should probably include some kind of dependency conflict detection at least in the health checks.
from rocks.nvim.
can rocks.nvim support isolated versions on the same dependency?
luarocks can install different versions of the same package, but I don't know at this point if it causes issues at runtime. My guess would be that a
require
will load the first module it finds on the path.We should probably include some kind of dependency conflict detection at least in the health checks.
maybe first investigate if isolated runtime path is supported by Neovim.
in second thought, maybe it's not supported at all in Neovim. I never read relate things in Neovim documents.
update:
based on intuition, I guess Neovim is just appending plugin folder to its runtime path, so let lua require
can correctly find the plugin source code (include other things e.g. plugin
, autoload
).
Thus provide different runtime path for different plugin seems not possible. Because one process (Neovim editor instance) only have one environment path $PATH
.
To support different runtime path, a plugin will have to run in a isolated child process, e.g. a remote plugin.
update-2:
but how does lua and luarocks community (without considering Neovim) handle such case?
If there are two luarocks packages: a
and b
, they all depend on the third luarocks package c
, with different versions, for example 1.*
and 2.*
.
How does lua handle the runtime path itself?
from rocks.nvim.
We don't add dependencies to the rtp, just to the package.path
and package.cpath
.
But it looks like luarocks handles conflicting dependencies as it should.
from rocks.nvim.
We don't add dependencies to the rtp, just to the
package.path
andpackage.cpath
.But it looks like luarocks handles conflicting dependencies as it should.
then it should be all good, at least luarocks itself solved dependencies with different versions correctly.
this issue happens all the time, in all programming languages and package managera: java and maven/gradle, ubuntu and apt, cpp and cmake.
from rocks.nvim.
Related Issues (20)
- [BUG]: Rocks sync keeps installing and uninstalling plugins if the name is not lower case HOT 6
- [Bug] `:Rocks sync` fails when there are no plugins in rocks.toml
- [Feature] Prompt to sync rocks if plugins cannot be loaded at startup HOT 2
- deprecate `rocks.api.source_runtime_dir` -> Extract to its own library HOT 1
- [Feature]: `:Rocks try` HOT 2
- Ensure luarocks operations complete cleanly when exiting neovim
- [Module] rocks-nix.nvim
- Processing of luarocks fails when cwd is rocks or plugin directory HOT 17
- :Rocks sync error logging is unhelpful HOT 4
- Rocks update fails HOT 3
- :Rocks log missing error HOT 3
- [Feature] Allow overriding or extending the luarocks config
- Plugins not starting HOT 3
- AUR install script
- [Enhancement] pin luarocks version / manage luarocks installation
- vim.tbl_islist is deprecated HOT 6
- [Module]: `rocks-format.nvim` HOT 1
- doesn't work on systems without libgcc_s.so.1 HOT 5
- [BUG] Breaking change in luarocks cmdline interface HOT 2
- [Bug] "Failed to remove symlink" error log
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 rocks.nvim.