Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Parser] Referencing another class limitations #272

Open
polsm91 opened this issue Aug 12, 2019 · 0 comments
Open

[Parser] Referencing another class limitations #272

polsm91 opened this issue Aug 12, 2019 · 0 comments

Comments

@polsm91
Copy link
Collaborator

polsm91 commented Aug 12, 2019

I don't think it makes sense to invest time in fixing the parser, we should move to type hints. But to have this documented somewhere:

Referencing another class only works in some circumstances. e.g:

class OtherClass(StorageObj):
  '''
  @ClassField myvar int
  '''


# This will crash

class A(StorageObj):
  '''
  @ClassField OtherClass
  '''

# This will work

class B(StorageObj):
  '''
  @ClassField __main__.OtherClass
  '''

class B(StorageObj):
  '''
  @ClassField /custom/path/file.py:OtherClass
  '''

Also, this is the reason why we need to place class definitions in separate files in PyCOMPSs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant