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

Paq 1.0 #87

Merged
merged 24 commits into from
Dec 10, 2021
Merged

Paq 1.0 #87

merged 24 commits into from
Dec 10, 2021

Conversation

savq
Copy link
Owner

@savq savq commented Dec 6, 2021

New features

  • vim.notify support. this function prints to :messages by default, so nothing will change for those not overriding it.
  • User autocommands support. See :help paq-autocommands.

Fixes

  • Various error handling improvements
  • Fix environment variable inheritance for spawned processes
  • The path setup option is now read correctly
  • Fix path handling for :PaqClean

Breaking changes

  • Remove paq-nvim alias. Users should call require('paq') instead
  • Remove support for nvim 0.4. nvim 0.5 should still be supported
  • Replace PaqRunHooks with PaqRunHook
  • The verbose setup option now defaults to false. Messages like (up-to-date) foo won't appear, instead a message like Paq: sync complete. 0 ok; 0 errors; 20 no-ops will appear at the end (where no-ops indicate the packages already up-to-date). When there's nothing to install, it'll simply print Paq: Nothing to install

savq added 23 commits November 13, 2021 16:21
Use different names for single repo operations (`clone`/`pull`) and bulk
operations (`install`/`update`).
Use coroutine/iterator to count operations.
- closes #65
- Add vim.notify to the compat module.
- Default to `verbose=false`
- format
- update messages table
- add summary at the end of operations
- change list function a little bit
- create `parse_name`
- remove num_pkgs
store a list of environment variables when paq module is initialized,
and append GIT_TERMINAL_PROMPT. This means that if env variables change,
Paq will need to be cleared from the lua cache and `require`d again.

This is not a fancy solution, but it works for now.

- Fixes #77
- Fixes #82
- Also place command definitions at the top to keep all "global" actions
  together.
Add User events `PaqDoneInstall` and `PaqDoneUpdate`.

Closes #71
The command `PaqRunHook` takes the name of a package as argument.
The previous `PaqRunHooks` is deprecated.

(better solution for #53)
Stick with `path` because it's the name given in the docs for the setup
function.
To prevent PaqDone* events to be raised before a hook has completed
executing.
Testing is now easier with User events and autocmds, although more tests
wouldn't hurt.
Paq has had 3 different methods for removing packages:

1. Recursively walk the directory tree, removing files and directories
   with the `uv.fs_*` functions (this is verbose, but it works).

2. Calling `rm` with `uv.spawn`. This does nothing on Windows. See #69

3. Calling vim's `delete` function. This will try to read file names as
   regexes. I noticed when trying to delete VimTeX; see the aptly named
   `vimtex/test/test-get-main/test-ugly-paths/`. I've looked for ways to
   prevent this, but had no success.

Number 1. is the only solution that works correctly on multiple platforms.
BREAKING CHANGE:

- Remove the `hook` option. It's been deprecated since v0.6.

- Remove `PaqRunHooks`. It's been an awful hack since it was
  introduced. The new `PaqRunHook` works much better.

See #53
BREAKING CHANGE: Users should call `require('paq')` instead of
`require('paq-nvim')`.

The name `paq-nvim` has been deprecated since 0.9.
BREAKING CHANGE: paq now requires nvim 0.5 or greater.
When a merging a branch with multiple commits, GitHub will name the PR
after the branch, so it's better to give meaningful names from now on.
@savq savq changed the title Refactor for Paq 1.0 Paq 1.0 Dec 6, 2021
@savq savq marked this pull request as ready for review December 10, 2021 21:46
@savq savq merged commit 3639e51 into master Dec 10, 2021
@savq savq deleted the refactor branch December 11, 2021 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant