Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–252 unchanged (252 lines)
253 Installer.new(new_cask, **new_options)
254
255 started_upgrade = false
256 new_artifacts_installed = false
257
258 begin
259 oh1 <<~EOS
260 Upgrading #{Formatter.identifier(old_cask)}
261 #{old_cask.version} -> #{new_cask.version}
262 EOS
263
264 # Start new cask's installation steps
265 new_cask_installer.check_conflicts
266
267 if (caveats = new_cask_installer.caveats)
268 puts caveats
…lines 269–298 unchanged (30 lines)

After

…lines 1–252 unchanged (252 lines)
253 Installer.new(new_cask, **new_options)
254
255 started_upgrade = false
256 new_artifacts_installed = false
257
258 begin
259 oh1 "Upgrading #{Formatter.identifier(old_cask)}"
260 puts " #{old_cask.version} -> #{new_cask.version}"
261
262 # Start new cask's installation steps
263 new_cask_installer.check_conflicts
264
265 if (caveats = new_cask_installer.caveats)
266 puts caveats
…lines 267–296 unchanged (30 lines)

Before

program
comment "# typed: strict"
comment "# frozen_string_literal: true"
call
identifier "require"
argument_list
string
" "\""
string_content "env_config"
" "\""
call
identifier "require"
argument_list
string
" "\""
string_content "cask/config"
" "\""
call
identifier "require"
argument_list
string
" "\""
string_content "utils/output"
" "\""
module
module "module"
constant "Cask"
body_statement
class
class "class"
constant "Upgrade"
body_statement
call
identifier "extend"
argument_list
scope_resolution
scope_resolution
scope_resolution
:: "::"
constant "Utils"
:: "::"
constant "Output"
:: "::"
constant "Mixin"
call
identifier "sig"
block
{ "{"
block_body
call
identifier "returns"
argument_list
( "("
element_reference
scope_resolution
constant "T"
:: "::"
constant "Array"
[ "["
constant "String"
] "]"
) ")"
} "}"
singleton_method (+36 nodes collapsed)
call (+123 nodes collapsed)
singleton_method (+223 nodes collapsed)
call (+225 nodes collapsed)
singleton_method (+931 nodes collapsed)
call (+122 nodes collapsed)
singleton_method
def "def"
self "self"
. "."
identifier "upgrade_cask"
method_parameters (+34 nodes collapsed)
body_statement
call
identifier "require"
argument_list
string
" "\""
string_content "cask/installer"
" "\""
assignment
identifier "start_time"
= "="
call
constant "Time"
. "."
identifier "now"
call
identifier "odebug"
argument_list
string
" "\""
string_content "Started upgrade process for Cask "
interpolation
#{ "#{"
identifier "old_cask"
} "}"
" "\""
assignment
identifier "old_config"
= "="
call
identifier "old_cask"
. "."
identifier "config"
assignment (+26 nodes collapsed)
assignment
identifier "old_cask_installer"
= "="
call
constant "Installer"
. "."
identifier "new"
argument_list
( "("
identifier "old_cask"
, ","
hash_splat_argument
** "**"
identifier "old_options"
) ")"
assignment
call
identifier "new_cask"
. "."
identifier "config"
= "="
call
call
identifier "new_cask"
. "."
identifier "default_config"
. "."
identifier "merge"
argument_list
( "("
identifier "old_config"
) ")"
assignment (+47 nodes collapsed)
assignment
identifier "new_cask_installer"
= "="
call
constant "Installer"
. "."
identifier "new"
argument_list
( "("
identifier "new_cask"
, ","
hash_splat_argument
** "**"
identifier "new_options"
) ")"
assignment
identifier "started_upgrade"
= "="
false "false"
assignment
identifier "new_artifacts_installed"
= "="
false "false"
begin
begin "begin"
call
identifier "oh1"
argument_list
heredoc_beginning "<<~EOS"
heredoc_body
heredoc_content "\n Upgrading "
interpolation
#{ "#{"
call
constant "Formatter"
. "."
identifier "identifier"
argument_list
( "("
identifier "old_cask"
) ")"
} "}"
heredoc_content "\n "
interpolation
#{ "#{"
call
identifier "old_cask"
. "."
identifier "version"
} "}"
heredoc_content " -> "
interpolation
#{ "#{"
call
identifier "new_cask"
. "."
identifier "version"
} "}"
heredoc_content "\n "
heredoc_end "EOS"
comment "# Start new cask's installation steps"
call
identifier "new_cask_installer"
. "."
identifier "check_conflicts"
if
if "if"
parenthesized_statements
( "("
assignment
identifier "caveats"
= "="
call
identifier "new_cask_installer"
. "."
identifier "caveats"
) ")"
then
call
identifier "puts"
argument_list
identifier "caveats"
end "end"
call
identifier "new_cask_installer"
. "."
identifier "fetch"
comment "# Move the old cask's artifacts back to staging"
call
identifier "old_cask_installer"
. "."
identifier "start_upgrade"
argument_list
( "("
pair
hash_key_symbol "successor"
: ":"
identifier "new_cask"
) ")"
comment "# And flag it so in case of error"
assignment
identifier "started_upgrade"
= "="
true "true"
comment "# Install the new cask"
call
identifier "new_cask_installer"
. "."
identifier "stage"
call
identifier "new_cask_installer"
. "."
identifier "install_artifacts"
argument_list
( "("
pair
hash_key_symbol "predecessor"
: ":"
identifier "old_cask"
) ")"
assignment
identifier "new_artifacts_installed"
= "="
true "true"
comment "# If successful, wipe the old cask from staging."
call
identifier "old_cask_installer"
. "."
identifier "finalize_upgrade"
rescue (+42 nodes collapsed)
end "end"
assignment
identifier "end_time"
= "="
call
constant "Time"
. "."
identifier "now"
call
call
constant "Homebrew"
. "."
identifier "messages"
. "."
identifier "package_installed"
argument_list
( "("
call
identifier "new_cask"
. "."
identifier "token"
, ","
binary
identifier "end_time"
- "-"
identifier "start_time"
) ")"
end "end"
end "end"
end "end"

After

program
comment "# typed: strict"
comment "# frozen_string_literal: true"
call
identifier "require"
argument_list
string
" "\""
string_content "env_config"
" "\""
call
identifier "require"
argument_list
string
" "\""
string_content "cask/config"
" "\""
call
identifier "require"
argument_list
string
" "\""
string_content "utils/output"
" "\""
module
module "module"
constant "Cask"
body_statement
class
class "class"
constant "Upgrade"
body_statement
call
identifier "extend"
argument_list
scope_resolution
scope_resolution
scope_resolution
:: "::"
constant "Utils"
:: "::"
constant "Output"
:: "::"
constant "Mixin"
call
identifier "sig"
block
{ "{"
block_body
call
identifier "returns"
argument_list
( "("
element_reference
scope_resolution
constant "T"
:: "::"
constant "Array"
[ "["
constant "String"
] "]"
) ")"
} "}"
singleton_method (+36 nodes collapsed)
call (+123 nodes collapsed)
singleton_method (+223 nodes collapsed)
call (+225 nodes collapsed)
singleton_method (+931 nodes collapsed)
call (+122 nodes collapsed)
singleton_method
def "def"
self "self"
. "."
identifier "upgrade_cask"
method_parameters (+34 nodes collapsed)
body_statement
call
identifier "require"
argument_list
string
" "\""
string_content "cask/installer"
" "\""
assignment
identifier "start_time"
= "="
call
constant "Time"
. "."
identifier "now"
call
identifier "odebug"
argument_list
string
" "\""
string_content "Started upgrade process for Cask "
interpolation
#{ "#{"
identifier "old_cask"
} "}"
" "\""
assignment
identifier "old_config"
= "="
call
identifier "old_cask"
. "."
identifier "config"
assignment (+26 nodes collapsed)
assignment
identifier "old_cask_installer"
= "="
call
constant "Installer"
. "."
identifier "new"
argument_list
( "("
identifier "old_cask"
, ","
hash_splat_argument
** "**"
identifier "old_options"
) ")"
assignment
call
identifier "new_cask"
. "."
identifier "config"
= "="
call
call
identifier "new_cask"
. "."
identifier "default_config"
. "."
identifier "merge"
argument_list
( "("
identifier "old_config"
) ")"
assignment (+47 nodes collapsed)
assignment
identifier "new_cask_installer"
= "="
call
constant "Installer"
. "."
identifier "new"
argument_list
( "("
identifier "new_cask"
, ","
hash_splat_argument
** "**"
identifier "new_options"
) ")"
assignment
identifier "started_upgrade"
= "="
false "false"
assignment
identifier "new_artifacts_installed"
= "="
false "false"
begin
begin "begin"
call
identifier "oh1"
argument_list
string
" "\""
string_content "Upgrading "
interpolation
#{ "#{"
call
constant "Formatter"
. "."
identifier "identifier"
argument_list
( "("
identifier "old_cask"
) ")"
} "}"
" "\""
call
identifier "puts"
argument_list
string
" "\""
string_content " "
interpolation
#{ "#{"
call
identifier "old_cask"
. "."
identifier "version"
} "}"
string_content " -> "
interpolation
#{ "#{"
call
identifier "new_cask"
. "."
identifier "version"
} "}"
" "\""
comment "# Start new cask's installation steps"
call
identifier "new_cask_installer"
. "."
identifier "check_conflicts"
if
if "if"
parenthesized_statements
( "("
assignment
identifier "caveats"
= "="
call
identifier "new_cask_installer"
. "."
identifier "caveats"
) ")"
then
call
identifier "puts"
argument_list
identifier "caveats"
end "end"
call
identifier "new_cask_installer"
. "."
identifier "fetch"
comment "# Move the old cask's artifacts back to staging"
call
identifier "old_cask_installer"
. "."
identifier "start_upgrade"
argument_list
( "("
pair
hash_key_symbol "successor"
: ":"
identifier "new_cask"
) ")"
comment "# And flag it so in case of error"
assignment
identifier "started_upgrade"
= "="
true "true"
comment "# Install the new cask"
call
identifier "new_cask_installer"
. "."
identifier "stage"
call
identifier "new_cask_installer"
. "."
identifier "install_artifacts"
argument_list
( "("
pair
hash_key_symbol "predecessor"
: ":"
identifier "old_cask"
) ")"
assignment
identifier "new_artifacts_installed"
= "="
true "true"
comment "# If successful, wipe the old cask from staging."
call
identifier "old_cask_installer"
. "."
identifier "finalize_upgrade"
rescue (+42 nodes collapsed)
end "end"
assignment
identifier "end_time"
= "="
call
constant "Time"
. "."
identifier "now"
call
call
constant "Homebrew"
. "."
identifier "messages"
. "."
identifier "package_installed"
argument_list
( "("
call
identifier "new_cask"
. "."
identifier "token"
, ","
binary
identifier "end_time"
- "-"
identifier "start_time"
) ")"
end "end"
end "end"
end "end"