| Age | Commit message (Collapse) | Author |
|
|
|
|
|
Present a more helpful error message if a formula file was loaded, but
the class(es) therein didn't match the expected formula class name.
|
|
Also make `Homebrew/homebrew` as an alias of this tap to keep
backward compatibility.
|
|
Core tap will be separated from core code in the near future.
It makes sense to rename it to CoreTap.
|
|
formula_rename and tap_migrations are now handled inside Tap.
Closes Homebrew/homebrew#49549.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
* Use `Tap#formula_dir` instead of `Tap#formula_files` to find formula
file to have better performance and avoid caching issue.
* Change the loader logic to search name -> search alias -> search old name.
This is more consistence with what we do when loading core formula
file.
Closes Homebrew/homebrew#49484.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
For users whose local brew is at around 2015-06-11 to 2015-08-06,
running `brew update` will emit following error:
Error: uninitialized constant Formulary::CoreFormulaRepository
This is caused by the same bug described in Homebrew/homebrew#42553.
This commit workarounds this issue and restores `brew update` compatibility
for users mentioned above.
Also cleanup legacy `require "cmd/tap"`.
|
|
Let's hide implementation detail on where to find core formulae alias
directory. This will benefit future core code and formulae separation.
|
|
Fixes Homebrew/homebrew#46984.
|
|
|
|
|
|
|
|
|
|
Closes Homebrew/homebrew#46537.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
The flow is as follow:
* If tap is nil(DIY install), search using name.
* If tap is found, search using full name.
* If tap is found and full name searching failed, search using name.
This usually means the formula may be migrated to different tap.
Closes Homebrew/homebrew#44771.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
There are plenty of IO operations inside Tap object, and it will be more
when implementing formula alias reverse look up(e.g. list all of alias
names for a formula). So let's cache them.
Some benchmark:
$ time brew info $(brew ruby -e 'puts Formula.tap_names') > /dev/null
Before: 6.40s user 2.42s system 96% cpu 9.134 total
After: 4.75s user 0.77s system 97% cpu 5.637 total
Closes Homebrew/homebrew#44377.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Closes Homebrew/homebrew#42743.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
Everything that used HOMEBREW_CELLAR/canonical_name
could point to something that doesn't exist because
loader_for tries to load new name formula if no old
name found. However there can be software installed
from path with the same name that renamed formulae
had and we still need to link/unlink/uninstall etc
that software. The solution is Formulary#to_rack
method that returns rack for given name.
- Add Formulary#to_rack
- Update ARGV.kegs
- Update cmd/switch
|
|
|
|
|
|
|
|
|
|
Closes Homebrew/homebrew#42354.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
|
|
|
|
Closes Homebrew/homebrew#42049.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
* Restore the ability to load formula by `user/homebrew-repo/foo`.
* Only suggest to install tap when tap isn't installed.
Closes Homebrew/homebrew#41705.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
Closes Homebrew/homebrew#40606.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
Closes Homebrew/homebrew#40486.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
|
|
Fixes Homebrew/homebrew#40311.
|
|
|
|
Closes Homebrew/homebrew#40151.
Closes Homebrew/homebrew#40203.
|
|
Fixes Homebrew/homebrew#40171.
|
|
|
|
If there are multiple tap formulae with the name of ref,
then ref is the canonical name
|
|
|
|
|
|
|
|
This is a little code refactoring splited from Homebrew/homebrew#36753
The idea is to eliminate `Formula#path` outside of `formulary.rb`.
And I indent to deprecate `Formula#path` method when I reimplement
symlink free tap function.
Closes Homebrew/homebrew#39313.
|
|
|
|
Formulary.loader_for cannot raise exceptions, as canonical_name must
work for nonexistent formulae. However, we can skip the constant lookup
and a redundant file existence check by returning a loader that raises
immediately in #get_formula.
|
|
|