This repository has been archived by the owner. It is now read-only.

Language module dependency package and import name mismatch #11078

Closed
ypomortsev opened this Issue Mar 20, 2012 · 2 comments

Comments

Projects
None yet
2 participants
Contributor

ypomortsev commented Mar 20, 2012

The LanguageModuleDependency tests check for the existence of a module by trying to import it by the name specified in the formula. However, the import name may not always match the name used in the package manager.

For example, the Ruby net-http-persistent module is imported using net/http/persistent. Specifying it as such in the formula,

depends_on 'net/http/persistent' => :ruby

gives a misleading error message:

Unsatisfied dependency: net/http/persistent
Homebrew does not provide Ruby dependencies; install with:
  gem install net/http/persistent

Specifying the proper gem name, net-http-persistent, will cause the test to always fail.

Contributor

adamv commented Mar 20, 2012

I'll update LanguageModuleDependency to allow for differing names/modules.

@ghost ghost assigned adamv Mar 20, 2012

Contributor

adamv commented Mar 21, 2012

There isn't a fancy depends_on syntax, but a module like this will be able to be used like:

depends_on LanguageModuleDependency.new :ruby, 'net-http-persistent', 'net/http/persistent'

@adamv adamv closed this in c9d8528 Mar 21, 2012

@staticfloat staticfloat added a commit to staticfloat/homebrew that referenced this issue Mar 26, 2012

@adamv @staticfloat adamv + staticfloat Allow a different package and import name for language deps.
Some times the module to import is different than the module to install
when dealing with external dependencies. This change allows an optional
import name to be specififed when it is different from the module name.

Closes #11078.
9b61aff

@Sharpie Sharpie pushed a commit to Sharpie/homebrew that referenced this issue Jun 18, 2012

@adamv adamv Allow a different package and import name for language deps.
Some times the module to import is different than the module to install
when dealing with external dependencies. This change allows an optional
import name to be specififed when it is different from the module name.

Closes #11078.
c4ce2ae

@snakeyroc3 snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this issue Dec 17, 2012

@adamv adamv Allow a different package and import name for language deps.
Some times the module to import is different than the module to install
when dealing with external dependencies. This change allows an optional
import name to be specififed when it is different from the module name.

Closes #11078.
de1006b

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.