def _owns(self, target, path):
if target not in self._filemap:
files = self._filemap[target]
files_owned_by_target = (target.sources_relative_to_buildroot() if target.has_sources()
else [])
// TODO (tdesai): This case to handle resources in PythonTarget.
// Remove this when we normalize resources handling across python and jvm targets.
if target.has_resources:
for resource in target.resources:
full_resource_path = os.path.join(target.payload.sources_rel_path, resource)
files_owned_by_target.append(full_resource_path)
for owned_file in files_owned_by_target:
files.add(owned_file)
return path in self._filemap[target]
class Workspace(AbstractClass):
After Change
def _owns(self, target, path):
if target not in self._filemap:
self._filemap[target] = set(target.sources_relative_to_buildroot())
return path in self._filemap[target]