Skip to content

Instantly share code, notes, and snippets.

@olafurpg
Created December 4, 2019 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olafurpg/1ca73ff7ade18f42f9c1aeb11ef0f9a1 to your computer and use it in GitHub Desktop.
Save olafurpg/1ca73ff7ade18f42f9c1aeb11ef0f9a1 to your computer and use it in GitHub Desktop.
diff --git a/src/python/pants/backend/project_info/tasks/export.py b/src/python/pants/backend/project_info/tasks/export.py
index d2390d3..7fd9896 100644
--- a/src/python/pants/backend/project_info/tasks/export.py
+++ b/src/python/pants/backend/project_info/tasks/export.py
@@ -7,6 +7,7 @@ from collections import defaultdict
from twitter.common.collections import OrderedSet
+from pants.backend.jvm.subsystems.dependency_context import DependencyContext
from pants.backend.jvm.subsystems.jvm_platform import JvmPlatform
from pants.backend.jvm.subsystems.resolve_subsystem import JvmResolveSubsystem
from pants.backend.jvm.subsystems.scala_platform import ScalaPlatform
@@ -60,7 +61,7 @@ class ExportTask(ResolveRequirementsTaskBase, IvyTaskMixin, CoursierMixin):
@classmethod
def subsystem_dependencies(cls):
return super().subsystem_dependencies() + (
- DistributionLocator, JvmPlatform, PythonInterpreterCache, ScalaPlatform
+ DependencyContext, DistributionLocator, JvmPlatform, PythonInterpreterCache, ScalaPlatform
)
@staticmethod
@@ -277,7 +278,7 @@ class ExportTask(ResolveRequirementsTaskBase, IvyTaskMixin, CoursierMixin):
if classpath_products:
info['libraries'] = [self._jar_id(lib) for lib in target_libraries]
- strict_deps = False
+ strict_deps = DependencyContext.global_instance().defaulted_property(current_target, 'strict_deps')
if hasattr(current_target, 'strict_deps'):
strict_deps = True == getattr(current_target, 'strict_deps')
info['strict_deps'] = strict_deps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment