Project

General

Profile

Actions

Bug #19446

closed

Remove `compiler_wd` related warnings in `tool/update-deps`

Added by eightbitraptor (Matt V-H) over 2 years ago. Updated over 2 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:112474]

Description

Github PR #7331

The update deps tool uses intermediary build files to verify dependencies. When these *.i files are generated by gcc the second line is always of the form

# 1 "/home/runner/work/ruby/ruby//"

Which update-deps attempts to parse out and set as the compiler working directory. It iterates through the intermediary files and sets compiler_wd in this loop:

compiler_wd = nil
  path_i.each_line {|line|
    next if /\A\# \d+ "(.*)"/ !~ line
    dep = $1
    next if %r{\A<.*>\z} =~ dep # omit <command-line>, etc.
    next if /\.e?rb\z/ =~ dep
    compiler_wd ||= dep
    files[dep] = true
  }

This will always end up setting compiler_wd to the first line in the file, rather than the second, which means the subsequent check for the special gcc compiler dir line will fail, that line will be left in the resulting dependancy lists and manifests later on as warnings. We can see these by looking at any Github Actions Check Dependancies run like this one.

The warnings look like this

warning: file not found: /home/runner/work/ruby/ruby//
warning: file not found: /home/runner/work/ruby/ruby//
warning: file not found: /home/runner/work/ruby/ruby//
... ( ~350 lines of this)

The referenced PR fixes the way compiler_wd is set, in order to get rid of the warnings.

Actions #1

Updated by peterzhu2118 (Peter Zhu) over 2 years ago

  • Status changed from Open to Closed
Actions

Also available in: Atom PDF

Like0
Like0