Skip to content
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

vimPlugins.sqlite-lua: fix postPatch #350354

Conversation

andrevmatos
Copy link
Member

the output lua code in defs.lua looks like this:

  10if vim then
  11if vim.g.sql_clib_path then
  12error [[ sqlite.lua: vim.g.sql_clib_path is deprecated. Use vim.g.sqlite_clib_path instead. ]]
  13end
  14path = vim.g.sqlite_clib_path or /nix/store/220jcypl4rj05ffv1c074lf244av622g-sqlite-3.46.1/lib/libsqlite3.so
  15end

Which errors on L14 with invalid syntax near /.
We fix this by ensuring the sqlite so path is quoted.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@teto
Copy link
Member

teto commented Oct 22, 2024

arf the git history is polluted by a commit fruzzy: fix nim compiler to nim1 that seems to reformat the file as well :/ anyway good chance is it's silly me who wrote that.
For information, the plan is to stop patching the module and instead have the neovim wrapper collects the plugins X,passthru.initLua and autoadd them to the wrapper (if the user enabled the option).
This is for after the release though so your fix is welcome.

Would you mind adding a test that tries to load the shared library ? maybe nvimRequireCheck is enough ?

@andrevmatos
Copy link
Member Author

andrevmatos commented Oct 22, 2024

I think the commit which broke this (prior to the formatting) was 2f73bd7 (from #136942)

@andrevmatos andrevmatos force-pushed the vimPlugins/sqlite-lua/fix_postPatch branch from facd1e6 to 8522e58 Compare October 22, 2024 13:09
@teto
Copy link
Member

teto commented Oct 22, 2024

the --replace needs updating

Running phase: patchPhase
substituteStream() in derivation vimplugin-sqlite.lua-2024-04-21: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. (file 'lua/sqlite/defs.lua')
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase

and also I tried to build by keeping only the nvimRequireCheck and it succeeded even though the previous part is wrong so it seems just requiring the module doesn't execute the critical path. The tests seem to do too much that would fail. I've had a look at https://github.com/danielfalk/smart-open.nvim, looks like we would need at least a sqlite:open() call

@andrevmatos
Copy link
Member Author

I can fix the --replace call.
But how can I test that path using these overrides? This was supposed to be a simple typo fix =S

@andrevmatos andrevmatos force-pushed the vimPlugins/sqlite-lua/fix_postPatch branch from 8522e58 to 5aa2879 Compare October 22, 2024 21:32
@andrevmatos
Copy link
Member Author

Superseded by #351758

@andrevmatos andrevmatos deleted the vimPlugins/sqlite-lua/fix_postPatch branch November 2, 2024 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants