-
-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
joplin-cli 2.2.2 (new formula) #83099
Conversation
It seems that this is a GUI application. Wouldn't this be better suited as a cask? Edit: Oh, I see. This used to be a formula which was removed in #59053. |
For information, Joplin 2.3 which was just released has a fixed |
Is that a check that Homebrew is doing? Because based on the error message it seems to mean that there's an unnecessary file in that directory, but that could just be ignored, couldn't it? |
@laurent22 The Joplin desktop app is included in the cask repo rather than this one. Brew separates packages by terminal (here) and GUI (called casks). I'm as we speak updating this PR to version 2.2.2 of the terminal app! |
I think the issue is that brew targets multiple architectures and multiple operating systems. I suspect that one of the joplin dependencies is using a file watcher which in turn relies on some native code. That native code needs to somehow be included for each os / architecture separately I guess. But I'm unclear on how to do that in brew. I'll research further. Hopefully somebody more familiar with brew (ping @carlocab) might share some suggestions on this... |
As I suspected, it seems the chokidar package depends on fsevents, which seems to only apply to macOS. Can anybody point me to another package which has the same issue that I could use as a model? |
webpack is one of them but it doesn't look like they are doing anything special about fsevent: #81747 Perhaps that error, if that's what it is, can be ignored? |
Actually it looks like the package needs to be added to the allowlist: https://github.com/Homebrew/homebrew-core/pull/81747/files#diff-8ea64149238b88cfd570111cdfd02ca2325ebe7cd1930fc6937858a33dd61a50 |
@laurent22 Awesome, nice catch. I'll try adding |
Two of the installs failed during automated testing. The tests in question were 11-arm64
I suspect that 11-arm64 is macOS 11 on apple's M1 silicon. My suspicion is that
Edit: Adding more context to this error:
...
ubuntu-latest
My quick and dirty test of
@laurent22 Any idea what might be causing these test failures? It seems they're not related to joplin directly but to dependencies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the delayed reply -- been busy. Just a few more comments.
When you push further changes, please squash all of your commits into the first one. Thanks!
Formula/joplin-terminal.rb
Outdated
sha256 "15b932b51632dbcf8dfa0c39541af49b7e072b1a7c204e304d0fbdea6f1d787a" | ||
license "MIT" | ||
|
||
depends_on "node" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use Homebrew vips
as a dependency here? It seems to still be needed, and the formula previously had a vips
dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@carlocab I've added vips
as a dependency as requested. However, I can install this on my macOS (intel chip) machine without vips being a dependency (and vips is not installed by homebrew on my system). Also, I believe the tests on mac intel hardware all pass.
It seems that adding this dependency changes the errors that block both the 11-arm64
and ubuntu-latest
tests.
11-arm64
==> Installing 'bundler' gem
joplin-cli:
* Binaries built for a non-native architecture were installed into joplin-cli's prefix.
The offending files are:
/opt/homebrew/Cellar/joplin-cli/2.2.2/libexec/lib/node_modules/joplin/node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/MacOS/terminal-notifier (x86_64)
Error: 1 problem in 1 formula detected
This seems to be because node-notifier
doesn't work on apple's m1 chips:
I'd be very interested to hear from anyone who has an m1 chip if yarn add joplin
or npm install joplin
complete successfully. My suspicion is that joplin's terminal app simply doesn't work on m1 silicon due to a variety of issues with dependencies.
ubuntu-latest
Error: The following formulae cannot be installed from bottles and must be
built from source.
qt, poppler and vips
Already downloaded: /home/linuxbrew/.cache/Homebrew/downloads/da59d3b87c9ca458f5999e38c39a44b7226af89ff8f6634062a0c37eebe706a1--joplin-2.2.2.tgz
==> Verifying checksum for 'da59d3b87c9ca458f5999e38c39a44b7226af89ff8f6634062a0c37eebe706a1--joplin-2.2.2.tgz'
==> brew audit joplin-cli --online --new-formula
Error: install failed
==> FAILED joplin-cli
I suspect that this issue is caused by the addition of vips as a dependency, which I don't think is actually required. I suspect the original keytar issue was probably easier to resolve than this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed vips
as a dependency again. I think I captured the incorrect error for the ubuntu-latest
test without vips as a dependency.
f8cc790
to
6c7c923
Compare
Having a hard time keeping track of all the changes here, so I'll squash the commits together later. |
OK, I'm lost as to what the issues are here. This formula installs for me on macOS (intel) and appears to pass the tests on macOS intel machines. It doesn't work on arm64 nor ubuntu-latest. I don't know why, and having spent now >8 hours on this, I am out of available time to invest into this problem. Installing joplin from npm works fine on ubuntu and macOS, but I can't confirm about macOS on m1 arm64. Personally, I'll abandon this PR now, but if somebody else wants to push this forward, perhaps they will have more success than me. |
I'll try to help you finish this off. |
Don't delete the branch in your fork in the meantime -- that'll close this PR automatically. |
a6efe2b
to
bece590
Compare
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
bece590
to
57fa730
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only failure is due to the sqlite
dependency... But the previous formula already had this, so I think this is fine.
Thanks for your work here, @chmac!
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?I tried to create a test, however, joplin relies on the keychain service. So any command (joplin help
,joplin version
) will always throw a popup telling me that my credentials don't exist. I'm not sure how to workaround this problem as I understood the tests must be non interactive. Any suggestions here would be appreciated. Instead I added a stupidassert_match "joplin", "joplin"
test for now. My previous tries were:brew audit --strict <formula>
(after doingbrew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?I get the following error, to do with npm installing a universal binary for fsevents:
I'm not sure how to fix this. Any input / feedback would be appreciated. I've created this PR as a draft as I don't expect it to be merged with these two issues, but I'm unsure how to resolve them.I've added this package to the
audit_exceptions/universal_binary_allowlist.json
file. I'm assuming that this is an acceptable strategy, but I'll defer judgement on that to somebody who knows brew's policies.