Skip to content

source=None disables dependency on action #2594

Open
@bdbaddog

Description

@bdbaddog

This issue was originally created at: 2010-03-23 02:31:59.
This issue was reported by: ydirson.
ydirson said at 2010-03-23 02:31:59

Compare the output of "scons --tree=all a" on:

Command("a", "z", "touch $TARGET")
Command("z", None, "touch $TARGET")

and:

Command("a", None, "touch $TARGET")

Notice how the "touch" binary appears as a dep of "a" in the 1st case but not in the second. Happens also with 1.0.0.

garyo said at 2010-04-01 19:28:04

Bug party triage: Steven to research.

gregnoel said at 2010-07-21 17:00:31

Bug party triage. Bump the priority of this issue.

dirkbaechle said at 2010-12-08 07:54:17

Hi,

I debugged this in the current trunk (rev5189), on my Ubuntu 10.10 machine (64bit).

The problem is that implicit dependencies (like for "touch") are only updated in scan (Executor.py: l. 484)

        deps.extend(self.get_implicit_deps())

at the stack trace

  scan [Executor.py:484]
  scan_sources [Executor.py:451]
  scan [__init__.py:637]
  children [__init__.py:975]
  get_all_children [Executor.py:261]
  _find_next_ready_node [Taskmaster.py:780]
  next_task [Taskmaster.py:912]
  start [Job.py:193]
  run [Job.py:111]
  _build_targets [Main.py:1260]
  _main [Main.py:1066]
  _exec_main [Main.py:1302]
  main [Main.py:1338]

For the second try

  Command("a", None, "touch $TARGET")

no source file exists in self.batches[0].sources at

    def scan_sources(self, scanner):
        # TODO(batch):  scan by batches
        if self.batches[0].sources:
            self.scan(scanner, self.get_all_sources())

(Executor.py: l. 448), so self.scan() doesn't get called and the dependency to "/bin/touch" is not added.

Best regards,

Dirk

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions