Often when editing/saving files or switching branches and then running a command, pants reports an error:
IntrinsicError: The dependency graph contained a cycle:
@rule(pants.core.util_rules.source_files.determine_source_files()) <-
@rule(pants.engine.internals.graph.hydrate_sources(third_party/glog:glog))
@rule(pants.backend.shell.util_rules.shell_command.shell_command_in_sandbox())
@rule(pants.backend.shell.util_rules.shell_command.run_adhoc_result_from_target())
@rule(pants.core.util_rules.source_files.determine_source_files()) <-
This isn't a real dependency cycle, it goes away if we pkill pantsd and run again. In this particular case above, third_party/glog:glog is a target in our repo, but I wasn't changing anything in that directory at the time. This seems to happen more if we run a command quickly after saving a file (i.e. if we wait a few seconds, it happens less).
Context:
We use experimental_shell_command rules that wrap scripts to build C++, putting .o files into e.g. /dist/build, then later linking a binary by find'ing everything in dist/build.
@fabric-gh is this still an issue? If so, can you provide a small repo that reliably reproduces it under some conditions? It will be hard to fix without a repro. Thanks!
Often when editing/saving files or switching branches and then running a command, pants reports an error:
This isn't a real dependency cycle, it goes away if we
pkill pantsd
and run again. In this particular case above, third_party/glog:glog is a target in our repo, but I wasn't changing anything in that directory at the time. This seems to happen more if we run a command quickly after saving a file (i.e. if we wait a few seconds, it happens less).Context: We use experimental_shell_command rules that wrap scripts to build C++, putting .o files into e.g./dist/build, then later linking a binary by
find
'ing everything in dist/build.