https://pantsbuild.org/ logo
#general
Title
# general
b

brief-engineer-67497

04/26/2019, 11:11 AM
Hi, I'm trying to create a subSystem and when I try
MySubsystem.global_instance()
I get the error
No such options scope: my_subsystem_scope
. Looking at the existing subsystems like ivy or coursier I don't find how you register/declare your subsystem to pants …
r

red-balloon-89377

04/26/2019, 11:33 AM
Hi! I think it’s a class level variable:
Copy code
class JarDependencyManagement(Subsystem):
  """Used to keep track of pinning of external artifact versions.

  See the original design doc for this here:

  <https://docs.google.com/document/d/1AM_0e1Az_NHtR150Zsuyaa6u7InzBQGLq8MrUT57Od8/edit>
  """

  options_scope = 'jar-dependency-management'
The options_scope thing
b

brief-engineer-67497

04/26/2019, 11:42 AM
thank you ! actually I found out my problem. I needed to add
Copy code
@classmethod
    def subsystem_dependencies(self):
        return super(MyTask, self).subsystem_dependencies() + (MySubsystem,)
in the task using the subsystem
❤️ 1
r

red-balloon-89377

04/26/2019, 12:11 PM
Ohh, cool 🙂