berberman / nvfetcher

Generate nix sources expr for the latest version of packages
https://nvfetcher.torus.icu
MIT License
180 stars 16 forks source link

Decode error at '.src': Field does not exist #107

Closed brahyerr closed 1 year ago

brahyerr commented 1 year ago

Since the nixpkgs package is broken, I'm running the package from the flake in this repository. Running the current nvfetcher package results in the following error:

nvfetcher: Failed to parse config file: Decode error at '.src': Field does not exist

CallStack (from HasCallStack):
  error, called at app/Main.hs:33:15 in main:Main

Running an older version (0.6.0, specifically commit 9785e4fa1ac59d3513a6f1ad26a0ee1ebc6c1ae5) does not run into any errors. Here's my nvfetcher config file for reference:

[moonfly]
src.git = "https://github.com/bluz71/vim-moonfly-colors"
fetch.git = "https://github.com/bluz71/vim-moonfly-colors"

[oxocarbon]
src.git = "https://github.com/nyoom-engineering/oxocarbon.nvim"
fetch.git = "https://github.com/nyoom-engineering/oxocarbon.nvim"

[neorg]
src.git = "https://github.com/nvim-neorg/neorg"
fetch.git = "https://github.com/nvim-neorg/neorg"

[neorg-telescope]
src.git = "https://github.com/nvim-neorg/neorg-telescope"
fetch.git = "https://github.com/nvim-neorg/neorg-telescope"

[web-devicons]
src.git = "https://github.com/nvim-tree/nvim-web-devicons"
fetch.git = "https://github.com/nvim-tree/nvim-web-devicons"

[coq_nvim]
src.git = "https://github.com/ms-jpq/coq_nvim"
fetch.git = "https://github.com/ms-jpq/coq_nvim"

[coq_3p]
src.git = "https://github.com/ms-jpq/coq.thirdparty"
fetch.git = "https://github.com/ms-jpq/coq.thirdparty"

[coq.artifacts]
src.git = "https://github.com/ms-jpq/coq.artifacts"
fetch.git = "https://github.com/ms-jpq/coq.artifacts"

[comment]
src.git = "https://github.com/numToStr/Comment.nvim"
fetch.git = "https://github.com/numToStr/Comment.nvim"

[lspkind]
src.git = "https://github.com/onsails/lspkind.nvim"
fetch.git = "https://github.com/onsails/lspkind.nvim"

[lazy-lsp]
src.git = "https://github.com/dundalek/lazy-lsp.nvim"
fetch.git = "https://github.com/dundalek/lazy-lsp.nvim"

[nvim-lspconfig]
src.git = "https://github.com/neovim/nvim-lspconfig"
fetch.git = "https://github.com/neovim/nvim-lspconfig"

[null-ls]
src.git = "https://github.com/jose-elias-alvarez/null-ls.nvim"
fetch.git = "https://github.com/jose-elias-alvarez/null-ls.nvim"

[trouble]
src.git = "https://github.com/folke/trouble.nvim"
fetch.git = "https://github.com/folke/trouble.nvim"

[telescope]
src.git = "https://github.com/nvim-telescope/telescope.nvim"
fetch.git = "https://github.com/nvim-telescope/telescope.nvim"

[telescope-file-browser]
src.git = "https://github.com/nvim-telescope/telescope-file-browser.nvim"
fetch.git = "https://github.com/nvim-telescope/telescope-file-browser.nvim"

[gitsigns]
src.git = "https://github.com/lewis6991/gitsigns.nvim"
fetch.git = "https://github.com/lewis6991/gitsigns.nvim"

[parinfer]
src.git = "https://github.com/gpanders/nvim-parinfer"
fetch.git = "https://github.com/gpanders/nvim-parinfer"

[plenary]
src.git = "https://github.com/nvim-lua/plenary.nvim"
fetch.git = "https://github.com/nvim-lua/plenary.nvim"

[conjure]
src.git = "https://github.com/Olical/conjure"
fetch.git = "https://github.com/Olical/conjure"

[crates]
src.git = "https://github.com/saecki/crates.nvim"
fetch.git = "https://github.com/saecki/crates.nvim"

[lualine]
src.git = "https://github.com/nvim-lualine/lualine.nvim"
fetch.git = "https://github.com/nvim-lualine/lualine.nvim"

[neogen]
src.git = "https://github.com/danymat/neogen"
fetch.git = "https://github.com/danymat/neogen"

[notify]
src.git = "https://github.com/rcarriga/nvim-notify"
fetch.git = "https://github.com/rcarriga/nvim-notify"

[noice]
src.git = "https://github.com/folke/noice.nvim"
fetch.git = "https://github.com/folke/noice.nvim"

[nui]
src.git = "https://github.com/MunifTanjim/nui.nvim"
fetch.git = "https://github.com/MunifTanjim/nui.nvim"

[treesitter]
src.git = "https://github.com/nvim-treesitter/nvim-treesitter"
fetch.git = "https://github.com/nvim-treesitter/nvim-treesitter"

[treesitter-context]
src.git = "https://github.com/nvim-treesitter/nvim-treesitter-context"
fetch.git = "https://github.com/nvim-treesitter/nvim-treesitter-context"

[vim-nix]
src.git = "https://github.com/LnL7/vim-nix"
fetch.git = "https://github.com/LnL7/vim-nix"

[vimtex]
src.git = "https://github.com/lervag/vimtex"
fetch.git = "https://github.com/lervag/vimtex"

[which-key]
src.git = "https://github.com/folke/which-key.nvim"
fetch.git = "https://github.com/folke/which-key.nvim"

[indent-blankline]
src.git = "https://github.com/lukas-reineke/indent-blankline.nvim"
fetch.git = "https://github.com/lukas-reineke/indent-blankline.nvim"

[bufferline-lua]
src.git = "https://github.com/akinsho/bufferline.nvim"
fetch.git = "https://github.com/akinsho/bufferline.nvim"

[smart-splits]
src.git = "https://github.com/mrjones2014/smart-splits.nvim"
fetch.git = "https://github.com/mrjones2014/smart-splits.nvim"

[startup]
src.git = "https://github.com/startup-nvim/startup.nvim"
fetch.git = "https://github.com/startup-nvim/startup.nvim"

[bufdelete-nvim]
src.git = "https://github.com/famiu/bufdelete.nvim"
fetch.git = "https://github.com/famiu/bufdelete.nvim"

[nvim-colorzier]
src.git = "https://github.com/norcalli/nvim-colorizer.lua"
fetch.git = "https://github.com/norcalli/nvim-colorizer.lua"

[toggle-term]
src.git = "https://github.com/akinsho/toggleterm.nvim"
fetch.git = "https://github.com/akinsho/toggleterm.nvim"

[yuck-vim]
src.git = "https://github.com/elkowar/yuck.vim"
fetch.git = "https://github.com/elkowar/yuck.vim"
berberman commented 1 year ago

This piece of code causes the error:

[coq.artifacts]
src.git = "https://github.com/ms-jpq/coq.artifacts"
fetch.git = "https://github.com/ms-jpq/coq.artifacts"

Previously coq.artifacts will be the package name, but in order to fix #84, the config parser now follows the semantics of TOML, which means that artifacts is considered to be an inline table in coq table. To use dot as a part of key, you can quote the key like:

["coq.artifacts"]
src.git = "https://github.com/ms-jpq/coq.artifacts"
fetch.git = "https://github.com/ms-jpq/coq.artifacts"

The quotes are needed in config fed to nvchecker as well. I will push a commit to fix this soon.