-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Move Cask core code to Homebrew #725
Conversation
Pinging @reitermarkus, @mwean, @fanquake, @victorpopkov, @alebcay, @claui, and @phinze for visibility. |
CC @Homebrew/maintainers as this is a big one. |
I've opened #727 to fix the test failures here as they are in our code making assumptions about Cask code that we need to decide if they are valid. |
Some of the cask-tests are failing: https://bot.brew.sh/job/Brew%20Pull%20Requests/1302/version=el_capitan/testReport/junit/brew-test-bot/el_capitan/cask_tests/ |
You can probably remove all the "under Ruby 2.1" tests and may need some test fixtures to not assume Caskroom/homebrew-cask is tapped (although we could compromise that and just tap it before the test). It's probably worth doing these in a separate PR before merging this or the respective Cask PR. |
Seems that cask tap's path for test-bot is not |
@AnastasiaSulyagina on the test-bot: it's not even tapped 😀. This is something we could address at a later point, though. |
Although let me know which you'd rather do. |
I'd rather tap it before tests. |
🆒 I can open a PR for that.
Basically because at some point we're going to need to remove that reliance on having the tap tapped in favour of making tests create the Casks they expect and I figure that doesn't need to necessarily block this PR being merged. |
That would be nice :)
Thanks, got it. |
Speaking of Taps, If possible, you might want to merge in the last two commits in Homebrew/homebrew-cask#23821. The only thing I'm missing is an elegant way to redefine |
@reitermarkus I think you could merge that in for now as there's already conflicts there until there's a 👍 on holding off merging core PRs. |
Ok, merged the three remaining core PRs. Holding off now until this move is complete. |
Do we need stuff like the GitHub templates, CoC & other dotfiles from Cask here? Are they not remaining with the Cask tap? |
@DomT4 I'm in favour of moving basically everything for now and then removing them once they are over; it's too hard to review the diff for now. |
Cool. That was exactly my thought, that removing the unnecessary text files might make the diff actually reviewable, heh, but whether that's done in pre or post doesn't matter much. |
@jawshooah, are these tests needed? If yes, why should directories be undeletable and should I edit the paths somehow to fix it?
|
Undeletable directories include system and user directories that should never be included in |
As I understood |
This would mean we have need to call |
1c95ee6
to
69d2073
Compare
Hm. I thought that as it never was an issue before and appeared now in tests only, I can just replace |
Why can build pass in travis-ci/pr and fail in default? |
@AnastasiaSulyagina The filesystems may have different permissions. |
@AnastasiaSulyagina, could you rather cange https://github.com/AnastasiaSulyagina/brew/blob/move-cask/Library/Homebrew/cask/lib/hbc/macos.rb#L364 to |
Mentioned to @AnastasiaSulyagina in Slack: brew/Library/Homebrew/dev-cmd/test-bot.rb Lines 942 to 943 in b39eba6
$HOME variable to stop things being dumped in ~ and I'm guessing it's not getting expanded consistently as a result.
|
@MikeMcQuaid, might be worth knowing what |
Ok, seem's like it is using |
69d2073
to
0cb9d85
Compare
Rebased both PRs, fixed |
0cb9d85
to
24ba616
Compare
I might have found the reason why some of the
Seems like @AnastasiaSulyagina, could you try changing https://github.com/AnastasiaSulyagina/brew/blob/move-cask/Library/Homebrew/cask/lib/hbc/macos.rb#L369-L375 to the following? def system_dir?(dir)
SYSTEM_DIRS.include?(Pathname.new(dir).expand_path)
end
def undeletable?(dir)
UNDELETABLE_DIRS.include?(Pathname.new(dir).expand_path)
end |
24ba616
to
50f6214
Compare
It is not related to the PR, is it? |
@AnastasiaSulyagina, could you bump https://github.com/AnastasiaSulyagina/brew/blob/move-cask/Library/Homebrew/cask/spec/cask/system_command_spec.rb#L136 to 15 seconds? I don't think there's actually a deadlock, as this only times out occasionally. |
50f6214
to
a38a992
Compare
Finally! 🎉 |
a38a992
to
092e279
Compare
Merging this and Homebrew/homebrew-cask#23852 should follow soon afterwards 🎉. Great work, @AnastasiaSulyagina! |
brew tests
with your changes locally?Moving Cask core code to Homebrew as part of #14384.
Change is splitted in 2 commits to be easier to review. Any advice on better splitting or anything else welcome.
cc @MikeMcQuaid @vitorgalvao @jawshooah @adidalal (bring other cask maintainers please)