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

Homebrew doesn't like installing JS files in "lib" #9

Closed
jawshooah opened this issue Apr 11, 2016 · 9 comments
Closed

Homebrew doesn't like installing JS files in "lib" #9

jawshooah opened this issue Apr 11, 2016 · 9 comments

Comments

@jawshooah
Copy link

$ brew install nodenv/nodenv/node-build-update-defs
==> Installing node-build-update-defs from nodenv/nodenv
==> Downloading https://github.com/nodenv/node-build-update-defs/archive/v2.0.0.tar.gz
==> Downloading from https://codeload.github.com/nodenv/node-build-update-defs/tar.gz/v2.0.0
######################################################################## 100.0%
🍺  /usr/local/Cellar/node-build-update-defs/2.0.0: 13 files, 17.2K, built in 0 seconds

$ brew audit nodenv/nodenv/node-build-update-defs
nodenv/nodenv/node-build-update-defs:
 * Non-libraries were installed to "/usr/local/Cellar/node-build-update-defs/2.0.0/lib"
Installing non-libraries to "lib" is discouraged.
The offending files are:
  /usr/local/Cellar/node-build-update-defs/2.0.0/lib/build-node.js
  /usr/local/Cellar/node-build-update-defs/2.0.0/lib/build.js
  /usr/local/Cellar/node-build-update-defs/2.0.0/lib/fetch.js
  /usr/local/Cellar/node-build-update-defs/2.0.0/lib/scraper-nodejs.js
  /usr/local/Cellar/node-build-update-defs/2.0.0/lib/scraper.js

Error: 1 problem in 1 formula

We could move those files to libexec, but that's usually reserved for executables that aren't intended to be run directly by the user. Maybe src or js?

@jasonkarns
Copy link
Member

What special thing does homebrew do with that lib dir that makes it so unhappy with js files? And if that behavior is contrary to our use of those script files, is there a way to disable it within the formula? (like a no_lib type of thing?) Barring that, I'm probably okay with src. But this feels a bit like a homebrew/self-inflicted thing?

@jasonkarns
Copy link
Member

Doesn't look like there's a way to disable that check: http://www.rubydoc.info/github/Homebrew/brew/FormulaCellarChecks#check_non_libraries-instance_method

@jawshooah
Copy link
Author

Yeah, it looks like Homebrew automatically symlinks anything in lib to $(brew --prefix)/lib, so they're picky about what should be included.

@jasonkarns
Copy link
Member

Ah right. That definitely should be something that could be disabled. I'm
sure this can't be the only formula that ought not have lib symlinked (even
if not js). But barring a homebrew pr, switching ours to src is fine.
On Apr 11, 2016 5:26 PM, "Josh Hagins" notifications@github.com wrote:

Yeah, it looks like Homebrew automatically symlinks anything in lib to $(brew
--prefix)/lib, so they're picky about what should be included.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#9 (comment)

@jawshooah
Copy link
Author

An alternative might be to publish this package to npm rather than Homebrew. Makes sense, seeing as it depends on node anyway.

@jawshooah
Copy link
Author

nodenv/homebrew-nodenv#21 should take care of this without changing anything in this repo.

@jasonkarns
Copy link
Member

Yeah, I thought about that. But it'd be a bit trickier getting it
registered as nodenv plugin, right?
On Apr 11, 2016 5:58 PM, "Josh Hagins" notifications@github.com wrote:

An alternative might be to publish this package to npm rather than
Homebrew. Makes sense, seeing as it depends on node anyway.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#9 (comment)

@jawshooah
Copy link
Author

Could just do as Homebrew does with brew and treat anything in the path prefixed with nodenv- as a plugin.

@jasonkarns
Copy link
Member

resolved by nodenv/homebrew-nodenv#21

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

No branches or pull requests

2 participants