This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New release breaks everything #306
Comments
Also I got these errors [rest.nvim] WARN: Unrecognized configs found in setup: { "keybinds.2", "keybinds.1" }
[rest.nvim] Dependency 'lua-curl' was not found. Default HTTP client won't work
[rest.nvim] Dependency 'xml2lua' was not found. rest.nvim will be completely unable to use XML bodies in your requests
[rest.nvim] Dependency 'nvim-nio' was not found. rest.nvim will not work asynchronously
[rest.nvim] Dependency 'mimetypes' was not found. rest.nvim will be completely unable to recognize the file type of external body files |
I added the dependencies to luarocks.nvim and it's working, I use lazy.nvim so this is my config: {
"vhyrro/luarocks.nvim",
opts = {
rocks = { "lua-curl", "nvim-nio", "mimetypes", "xml2lua" }, -- Specify LuaRocks packages to install
},
} |
Thanks, I ll try that. This should be clarified in the documentation. |
This works, but the keybinds options seems like still broken. still have that error message, but it's fine, gotta setup them manually for now |
Hey, I'm very sorry that everything broke, but it was for improvement and it was necessary, nothing will break again! Could you send your keybind setup? I'm busy right now so I can't help much, but as soon as I can I'll take a look. Also thanks @8uff3r for helping there! :) |
It's okay for breaking changes, I like a new result preview, however it is better to make a stable release for the previous version that doesn't break, because I needed to search to the whole commit history just to make everything works as the previous one again. Anyway, here is my config options: opts = {
client = "curl",
env_file = ".env",
env_pattern = "\\.env$",
env_edit_command = "tabedit",
encode_url = true,
skip_ssl_verification = false,
custom_dynamic_variables = {},
logs = {
level = "info",
save = true,
},
highlight = {
enable = true,
timeout = 750,
},
result = {
split = {
in_place = false,
horizontal = false,
stay_in_current_window_after_split = true,
},
behavior = {
decode_url = true,
show_info = {
url = true,
headers = true,
http_info = true,
curl_command = true,
},
formatters = {
json = "jq",
html = function(body)
if vim.fn.executable("tidy") == 0 then
return body, { found = false, name = "tidy" }
end
local fmt_body = vim.fn.system({
"tidy",
"-i",
"-q",
"--tidy-mark", "no",
"--show-body-only", "auto",
"--show-errors", "0",
"--show-warnings", "0",
"-",
}, body):gsub("\n$", "")
return fmt_body, { found = true, name = "tidy" }
end,
},
},
},
keybinds = {
{ "<localleader>rr", "<cmd>Rest run<cr>", "Run request under the cursor", },
{ "<localleader>rl", "<cmd>Rest run last<cr>", "Re-run latest request", },
}
}, I just pasted everything from the default config based on the new README. |
I leave this comment here, just in case anyone else that want to revert to previous version. |
You can use lazy.nvim to setup your keybinds with {
"rest-nvim/rest.nvim",
keys = {
{ "<leader>rr", "<cmd>Rest run<cr>", desc = "Run REST request" },
},
}, |
In the repository there are tags and semantic releases that you can use in your plugin manager to rollback to the previous stable release :) Now, that bug is a little weird, I'll definitely take a look at it as soon as I get home, thanks for reporting it and also for providing a commit in case someone wants to rollback that way, that is appreciated. |
Oh, my bad, I didn't check the release tags, haha. Sorry for that |
@radvil I think I fixed the |
btw @8uff3r, does your lazy's install = {
missing = true,
} |
No I don't have that in my config but I according to lazy's docs it should be the default |
Could you please tell me what I am doing wrong? I keep getting the same OP errors with this configuration in Lazyvim:
|
In your luarocks.nvim config, you should remove this part: config = function()
require("luarocks").setup({})
end, So that it would be like this: {
"vhyrro/luarocks.nvim",
opts = {
rocks = { "lua-curl", "nvim-nio", "mimetypes", "xml2lua" },
},
} The removed part is overriding the |
Thanks, @8uff3r. It didn't work, though, and I'm still getting these dependency errors: [rest.nvim] Dependency 'lua-curl' was not found. Default HTTP client won't work
[rest.nvim] Dependency 'xml2lua' was not found. rest.nvim will be completely unable to use XML bodies in your requests
[rest.nvim] Dependency 'nvim-nio' was not found. rest.nvim will not work asynchronously
[rest.nvim] Dependency 'mimetypes' was not found. rest.nvim will be completely unable to recognize the file type of external body files It looks like Luarocks isn't installing them as it should. Is there any workaround or anything I can do to help troubleshoot? |
Hi, apologies for the problems! That's extremely rare, could you post what your I think the other person uses MacOS, if you do too then I will take my MacBook and do some installation tests since it has worked well for me on Linux and I want to rule out any problems with |
Hey, developer of Lazy will only re-run build files if they failed or if there is a newer version of the plugin in question. If you ever feel like something went wrong, Could you all try and rebuild with the commands above and see if you get any specific errors messages? That should help in the debugging process. Additionally, I've been working on a new version of the project in the
Let me know of any errors that you encounter along the way :) |
Hi, I've tried the latest version just now, the keybinds issue no longer exists, now I can hit my keymap, but the still can not read my default env file related to #308. Thanks |
I am using neovim nightly 0.10 on my ubuntu wsl and keep getting this error
here is my config: return {
{
"vhyrro/luarocks.nvim",
branch = "go-away-python",
opts = {
rocks = { "lua-curl", "nvim-nio", "mimetypes", "xml2lua" }, -- Specify LuaRocks packages to install
},
config = function()
require("luarocks").setup({})
end,
},
{
"rest-nvim/rest.nvim",
ft = "http",
lazy = false,
keys = {
{
"<leader>rr",
"<cmd>Rest run<cr>",
desc = "RestNvim Run",
},
{
"<leader>rl",
"<cmd>Rest last<cr>",
desc = "RestNvim Run Last",
},
},
dependencies = { "luarocks.nvim" },
config = function()
require("rest-nvim").setup()
end,
},
} this is my checkhealth rest-nvim
|
Hi, I think your system is missing the cURL development headers. Could you try installing them ( |
luarocks --local install Lua-cURL CURL_INCDIR=/usr/include/x86_64-linux-gnu/ |
Fixes for Broken LuarocksFirstly, this issue will be pinned to the project's issues for the next week or so such that people with broken configurations can quickly access the solution. Secondly, luarocks.nvim has pushed a breaking change (the last one we will push in a while), thus also affecting rest.nvim. I know two breakages in the span of a few days is mildly infuriating, but bear with us here! The new breaking change drops the Update your ConfigurationThe latest config for {
"vhyrro/luarocks.nvim",
priority = 1000,
config = true,
}, The high priority is important as it ensures that many versions of the same dependency in your configuration will work as anticipated. This priority should be the highest out of your entire configuration (1000 is probably enough) - we just need to ensure that this plugin loads first out of all the others. Completely Reinstall
|
Trying to use an external luarocks is not usually a good idea and will likely cause things to break when installing rocks for lua 5.1 -- that's just how it is :/ @mesa123123 if you run |
Oh damn! Really? Give me a few moments and I'll try and get the errors back up 🙂 |
As much as this plugin need to improve, but not like this where everything breaks. I just like it back then where curl is just the main dependency. Thankfully there's still another plugin that I can substitute for this which is vim-rest-console |
@alexxShandsome this is precisely why rest.nvim is versioned. Feel free to stay on the older version while the situation gets cleaned up :) |
Hey @vhyrro just getting some stats for you: output of manual builds 1nvim -l /build.lua`: |
You could lazy load it only for "http" filetype so Nvim won't try to load "rest" for every file / buffer |
@mesa123123 thanks for the error logs! I can't seem to figure out why things aren't working though just from the logs. It could be lazy yet again doing unexpected things during the build process, which would be a big shame. Could you also post your configuration, how you set up luarocks.nvim and rest.nvim? Thanks for your time in helping debug all this :) |
Hey @vhyrro my configs are in my dotfiles but the lines that rest.nvim is dealing with are these in the init.lua: Under plugin install lines [152-164]: {
"vhyrro/luarocks.nvim",
priority = 1000,
config = true,
},
{
"rest-nvim/rest.nvim",
ft = "http",
dependencies = { "luarocks.nvim" },
config = function()
require("rest-nvim").setup()
end,
}, and keymaps highlighted [lines 1735-1742]: ---------------------------------"
-- Http Execution - rest.nvim
---------------------------------"
require("rest-nvim").setup({})
norm_keyset("<leader>xhx", "RestNvim", "Run Http Under Cursor")
norm_keyset("<leader>xhp", "RestNvimPreview", "Preview Curl Command From Http Under Cursor")
norm_keyset("<leader>xhx", "RestNvim", "Re-Run Last Http Command")
Also definition of norm_keyset: -- Abstraction for the vast majority of my keymappings
local function norm_keyset(key, command, wkdesc)
keymap.set("n", key, "<cmd>" .. command .. "<CR>", { silent = true, noremap = true, desc = wkdesc })
end
|
Just saw I've setup rest.nvim twice, I'm going to check if this is the problem :/ |
@mesa123123 pushed a fix which I think might resolve the issue! As usual remove the luarocks.nvim and rest.nvim plugins with |
Tried to install luarocks on its own and then rest and still same error popping up :/ |
Hey @mesa123123, just noticed I had to modify the |
Also no need to apologise! This is part of being in open source! All part of it :D |
OK so I think I got it working: Basically I've added paths to my package path so nvim knows where to look for my paths: -- Package Path Upgrade
----------
-- Rocks installed through luarocks.nvim
package.path = package.path .. ";" .. plugin_path .. "/luarocks.nvim/.rocks/share/lua/6.1/?.lua;"
package.path = package.path .. ";" .. plugin_path .. "/luarocks.nvim/.rocks/share/lua/5.1/?/?.lua;"
-- Rocks installed through local luarocks
package.path = package.path .. ";" .. fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?/init.lua;"
package.path = package.path .. ";" .. fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?.lua;"
---------- And it seems to work now! Or at least my errors are all about treesitter!
Thats the output I get when I open a .http file |
I arrive a little later, but I figure out a way to make it works on macOS using previous comments and advice. {
"vhyrro/luarocks.nvim”,
-- explicit tell Lazy the module name due to error on calling
-- the module with the suffix ‘.nvim’; in this way Lazy will call < require “luarocks”.setup({}) >
name = "luarocks”,
config = true
},
{
"rest-nvim/rest.nvim",
dependencies = { "luarocks" },
ft = { "http", "https" },
config = function(_, o)
require "rest-nvim".setup(o)
end
} With this config all the build and installation is done correctly. |
with all the breaking changes, it would be nice to have documentation on how to migrate from the previous setup |
I seem to be getting an error as well. Not sure if it's related to this new release but sharing just in case. I am also stuck trying to get past it. Here is the error message. It seems to be a tree-sitter parsing issue but cannot for the life of me get passed this.
I should say that I've also tried several other iterations of configs setup that have been suggested in this thread, all with the same result. |
Check trailing spaces in your http file, delete them even in |
@cyaconi I have made sure that all of the white space has been cleared, there were none so unfortunately that isn't the issue :/ |
@nezudevv try to change {
"vhyrro/luarocks.nvim”,
name = ‘luarocks’,
opts = {
rocks = { "lua-curl", "nvim-nio", "mimetypes", "xml2lua" }
}
} Before reloading this config, in the If this is not working, try to send here the content of the file you’re trying to run via |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Seems like the neweset version breaks everything, all dependencies, options,everything.
Can you make a new branch associated to previous version before the breaking changes ??
It's so pain in the ass to re adjusting my configuration, like I dont have time.
Please make a new branch. Thanks
The text was updated successfully, but these errors were encountered: