8000 zsh-history-enquirer 1.3.0 (new formula) by danielbayley · Pull Request #154416 · Homebrew/homebrew-core · GitHub
[go: up one dir, main page]

Skip to content

zsh-history-enquirer 1.3.0 (new formula) #154416

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

Closed

Conversation

danielbayley
Copy link
Contributor
@danielbayley danielbayley commented Nov 15, 2023
  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

Reattempting #122728.

@github-actions github-actions bot added autosquash Automatically squash pull request commits according to Homebrew style. nodejs Node or npm use is a significant feature of the PR or issue new formula PR adds a new formula to Homebrew/homebrew-core labels Nov 15, 2023
@p-linnane
Copy link
Member

You will need to move this into the z directory and squash the commits into one with the message zsh-history-enquirer 1.3.0 (new formula).

@github-actions github-actions bot added automerge-skip `brew pr-automerge` will skip this pull request and removed autosquash Automatically squash pull request commits according to Homebrew style. labels Nov 15, 2023
@danielbayley danielbayley force-pushed the zsh-history-enquirer branch 2 times, most recently from c00f31e to f17b042 Compare November 15, 2023 17:43
@github-actions github-actions bot removed the automerge-skip `brew pr-automerge` will skip this pull request label Nov 15, 2023
@danielbayley
Copy link
Contributor Author

You will need to move this into the z directory and squash the commits into one with the message zsh-history-enquirer 1.3.0 (new formula).

@p-linnane Done.

@chenrui333 chenrui333 added test failure CI fails while running the test-do block linux Linux is specifically affected CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. labels Nov 16, 2023
@p-linnane p-linnane removed their request for review November 17, 2023 20:29
@chenrui333
Copy link
Member

I can take a look at the linux build failure tomorrow

@chenrui333
Copy link
Member
chenrui333 commented Nov 23, 2023
runner@fv-az1393-545:/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core$ zsh-history-enquirer
Error: Command failed with exit code 1: /home/linuxbrew/.linuxbrew/Cellar/zsh-history-enquirer/1.3.0/libexec/lib/node_modules/zsh-history-enquirer/dist/history.zsh
/home/linuxbrew/.linuxbrew/Cellar/zsh-history-enquirer/1.3.0/libexec/lib/node_modules/zsh-history-enquirer/dist/history.zsh:fc:13: no such event: 1
    at makeError$1 (/home/linuxbrew/.linuxbrew/Cellar/zsh-history-enquirer/1.3.0/libexec/lib/node_modules/zsh-history-enquirer/dist/index.js:1236:11)
    at handlePromise (/home/linuxbrew/.linuxbrew/Cellar/zsh-history-enquirer/1.3.0/libexec/lib/node_modules/zsh-history-enquirer/dist/index.js:2150:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async history (/home/linuxbrew/.linuxbrew/Cellar/zsh-history-enquirer/1.3.0/libexec/lib/node_modules/zsh-history-enquirer/dist/index.js:2315:24)
    at async Promise.all (index 1)
    at async searchHistory (/home/linuxbrew/.linuxbrew/Cellar/zsh-history-enquirer/1.3.0/libexec/lib/node_modules/zsh-history-enquirer/dist/index.js:6027:30) {
  shortMessage: 'Command failed with exit code 1: /home/linuxbrew/.linuxbrew/Cellar/zsh-history-enquirer/1.3.0/libexec/lib/node_modules/zsh-history-enquirer/dist/history.zsh',
  command: '/home/linuxbrew/.linuxbrew/Cellar/zsh-history-enquirer/1.3.0/libexec/lib/node_modules/zsh-history-enquirer/dist/history.zsh',
  escapedCommand: '"/home/linuxbrew/.linuxbrew/Cellar/zsh-history-enquirer/1.3.0/libexec/lib/node_modules/zsh-history-enquirer/dist/history.zsh"',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: '/home/linuxbrew/.linuxbrew/Cellar/zsh-history-enquirer/1.3.0/libexec/lib/node_modules/zsh-history-enquirer/dist/history.zsh:fc:13: no such event: 1',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

@danielbayley
Copy link
Contributor Author
danielbayley commented Nov 23, 2023
runner@fv-az1393-545:/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core$ zsh-history-enquirer
Error: Command failed with exit code 1: /home/linuxbrew/.linuxbrew/Cellar/zsh-history-enquirer/1.3.0/libexec/lib/node_modules/zsh-history-enquirer/dist/history.zsh
/home/linuxbrew/.linuxbrew/Cellar/zsh-history-enquirer/1.3.0/libexec/lib/node_modules/zsh-history-enquirer/dist/history.zsh:fc:13: no such event: 1
    at makeError$1 (/home/linuxbrew/.linuxbrew/Cellar/zsh-history-enquirer/1.3.0/libexec/lib/node_modules/zsh-history-enquirer/dist/index.js:1236:11)
    at handlePromise (/home/linuxbrew/.linuxbrew/Cellar/zsh-history-enquirer/1.3.0/libexec/lib/node_modules/zsh-history-enquirer/dist/index.js:2150:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async history (/home/linuxbrew/.linuxbrew/Cellar/zsh-history-enquirer/1.3.0/libexec/lib/node_modules/zsh-history-enquirer/dist/index.js:2315:24)
    at async Promise.all (index 1)
    at async searchHistory (/home/linuxbrew/.linuxbrew/Cellar/zsh-history-enquirer/1.3.0/libexec/lib/node_modules/zsh-history-enquirer/dist/index.js:6027:30) {
  shortMessage: 'Command failed with exit code 1: /home/linuxbrew/.linuxbrew/Cellar/zsh-history-enquirer/1.3.0/libexec/lib/node_modules/zsh-history-enquirer/dist/history.zsh',
  command: '/home/linuxbrew/.linuxbrew/Cellar/zsh-history-enquirer/1.3.0/libexec/lib/node_modules/zsh-history-enquirer/dist/history.zsh',
  escapedCommand: '"/home/linuxbrew/.linuxbrew/Cellar/zsh-history-enquirer/1.3.0/libexec/lib/node_modules/zsh-history-enquirer/dist/history.zsh"',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: '/home/linuxbrew/.linuxbrew/Cellar/zsh-history-enquirer/1.3.0/libexec/lib/node_modules/zsh-history-enquirer/dist/history.zsh:fc:13: no such event: 1',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

cc: @zthxxx, as I don’t have a Linux VM set up, or time to debug this one specific use case I don’t personally have…

@chenrui333
Copy link
Member

you can just use either codespace or linux action runner + tmate like what I did in here, https://github.com/chenrui333/github-action-test/blob/main/.github/workflows/brew-debug.yml#L49-L67

8000
@chenrui333
Copy link
Member

@danielbayley can you just file an upstream linux build issue report and we can do depends_on :macos for only building bottles for macos for now.

@danielbayley
Copy link
Contributor Author
danielbayley commented Nov 27, 2023

@danielbayley can you just file an upstream linux build issue report

@chenrui333 Sure, filed here: zthxxx/zsh-history-enquirer#73.

we can do depends_on :macos for only building bottles for macos for now.

https://github.com/Homebrew/homebrew-core/blob/e441c54b34bef99392fe744a8224e5c478a342a2/Formula/z/zsh-history-enquirer.rb#L10

@github-actions github-actions bot added autosquash Automatically squash pull request commits according to Homebrew style. macos-only Formula depends on macOS labels Nov 27, 2023
@zthxxx
Copy link
zthxxx commented Nov 30, 2023

depends_on :macos

It can run exactly under Linux Zsh; I also use it on all of my servers.

I noticed that the CI has failed due to the unit-test. Is that the problem with the test scripts?

@p-linnane p-linnane removed their request for review November 30, 2023 05:44
@github-actions github-actions bot added stale No recent activity and removed stale No recent activity labels Feb 8, 2024
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added stale No recent activity and removed stale No recent activity labels Feb 29, 2024
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added stale No recent activity and removed stale No recent activity labels Mar 21, 2024
@cho-m cho-m force-pushed the zsh-history-enquirer branch from e441c54 to c395857 Compare April 1, 2024 03:18
@github-actions github-actions bot removed autosquash Automatically squash pull request commits according to Homebrew style. macos-only Formula depends on macOS labels Apr 1, 2024
Co-Authored-By: Patrick Linnane <patrick@linnane.io>
Co-Authored-By: Michael Cho <michael@michaelcho.dev>
@cho-m cho-m force-pushed the zsh-history-enquirer branch from c395857 to 0f40846 Compare April 1, 2024 03:47
@cho-m
Copy link
Member
cho-m commented Apr 1, 2024

Tried some things out but still failing in CI.

In local Linux container, adjusting match seemed to help as arrow symbol was rendering differently.

Also, when manually running with ^R, command would fail without some basic ZSH history configs. However, I don't think this would impact existing test, but added fake .zshrc to try out.

Remaining things would be CI specific settings (perhaps TERM settings and so on).

Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

8000

@github-actions github-actions bot added the stale No recent activity label Apr 23, 2024
@danielbayley
Copy link
Contributor Author

It can run exactly under Linux Zsh; I also use it on all of my servers.

I noticed that the CI has failed due to the unit-test. Is that the problem with the test scripts?

@zthxxx Sounds like it must be. Maybe you want to look into getting it working with brew test on your local Linux setup?

@zthxxx
Copy link
zthxxx commented Apr 24, 2024

@danielbayley I'm really sorry about this. A few months ago, I have tried to solve testing on this, but I failed due to I'm not familiar with Ruby or how Homebrew tests running. 😢

Sorry for the late reply again.

@zthxxx
Copy link
zthxxx commented Apr 24, 2024

I have added unit-test for zsh plugin using expect in zthxxx/zsh-history-enquirer@00c7dfe#diff-0004d5adc0e5e69fd91c2d058cd8151332729eb9a6aefb97aff9fb2f72e1f4b1

@github-actions github-actions bot added the autosquash Automatically squash pull request commits according to Homebrew style. label Apr 25, 2024
@danielbayley
Copy link
Contributor Author
danielbayley commented Apr 25, 2024

I have added unit-test for zsh plugin using expect in zthxxx/zsh-history-enquirer@00c7dfe#diff-0004d5adc0e5e69fd91c2d058cd8151332729eb9a6aefb97aff9fb2f72e1f4b1

@zthxxx Nice, so I have tried to make use of this new unit test instead… cc: @cho-m @chenrui333 @p-linnane

@danielbayley danielbayley requested a review from p-linnane April 25, 2024 17:47
@danielbayley danielbayley force-pushed the zsh-history-enquirer branch from 0cb234f to 9787c06 Compare April 25, 2024 17:55
@danielbayley danielbayley force-pushed the zsh-history-enquirer branch from 9787c06 to 1d18813 Compare April 25, 2024 18:01
depends_on "zsh"
end

resource "zsh-widget.test" do
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also require of files in ./tests/testing-home/* for mock zsh testing environment, but not the single file 😢


match = "ech"
io = IO.popen(widget, "r")
stdout = io.expect(match, 30)
Copy link
@zthxxx zthxxx Apr 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems we can't access the tty in the CI pipeline (it's not an interactive tty and throws an error from the stty command).

Should we try a different testing approach? Maybe we could simply check if the zsh-history-enquirer.plugin.zsh file exists after installation,

or verify that the plugin function is loaded by .zshrc without actually executing it. For example, we could run zsh -il -c 'where history_enquire' and look for an exit code of 0.

@p-linnane p-linnane removed their request for review April 29, 2024 02:45
@p-linnane p-linnane closed this Jun 7, 2024
@github-actions github-actions bot added the outdated PR was locked due to age label Jul 8, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosquash Automatically squash pull request commits according to Homebrew style. CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. linux Linux is specifically affected new formula PR adds a new formula to Homebrew/homebrew-core nodejs Node or npm use is a significant feature of the PR or issue outdated PR was locked due to age stale No recent activity test failure CI fails while running the test-do block
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0