Skip to content

feature: Include environment variable in search path during redhawk-codegen #55

@nimartet

Description

@nimartet

I am using Redhawk 2.10 and was trying to generate a component that uses ports defined in JTRS idl. When I tried to generate the component, I received "No such file or directory" errors when parsing IDL. I since learned that it was because the code generation does not look at any environment variables or provide search path options for codegen. After submitting a question to stackoverflow, I used the information gained to update idllib.py to parse an environment variable to add to the search path:

bash# diff idllib.py idllib.py.bak
75,80d74
<         idl_path = os.environ.get('IDL_PATH')
< 
<         if idl_path:
<             for path in idl_path.split(os.pathsep):
<                 self.addSearchPath(path)
< 

This solved my problem. Would be nice to make if official.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions