Skip to content

Commit

Permalink
Good ol' print debugging for windows CI failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Vici37 committed Nov 24, 2024
1 parent d883a15 commit 2ac8eeb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/compiler/crystal/tools/typer.cr
Original file line number Diff line number Diff line change
Expand Up @@ -500,16 +500,18 @@ module Crystal
end

def_locs = @def_locators.map { |p| File.expand_path(p) }
@dir_locators = def_locs.reject(&.ends_with?(".cr")).select { |p| p.count(":") == 0 && !p.ends_with?(".cr") }
@file_locators = def_locs.select(&.ends_with?(".cr")).select { |p| p.ends_with?(".cr") }
@line_locators = def_locs.select { |d| d.count(":") == 1 }
@line_and_column_locators = def_locs.select { |d| d.count(":") == 2 }
pp! @dir_locators = def_locs.reject(&.ends_with?(".cr")).select { |p| p.count(":") == 0 && !p.ends_with?(".cr") }
pp! @file_locators = def_locs.select(&.ends_with?(".cr")).select { |p| p.ends_with?(".cr") }
pp! @line_locators = def_locs.select { |d| d.count(":") == 1 }
pp! @line_and_column_locators = def_locs.select { |d| d.count(":") == 2 }
end

def visit(node : Crystal::Def)
return false unless loc = node.location
return false unless loc.filename && loc.line_number && loc.column_number
pp! loc
if node_in_def_locators(loc)
puts "Accepted"
all_defs << node
files << loc.filename.to_s
end
Expand Down

0 comments on commit 2ac8eeb

Please sign in to comment.