Skip to content

Exception when Setting default fileset in design  #59

@RasmusGOlsen

Description

@RasmusGOlsen

I get an exception when trying to set the default fileset in the design. Using fileset.Name work, but not with the fileset object. Looking at the source it seems like both ways should be supported.

project = Project('default')
fileset = Fileset('myfileset')
project.DefaultDesign.DefaultFileSet = fileset
  File "/home/rgo/devel/simplhdl/src/simplhdl/__main__.py", line 60, in main
    simpl.create_project(args.projectspec)
  File "/home/rgo/devel/simplhdl/src/simplhdl/simplhdl.py", line 30, in create_project
    project.DefaultDesign.DefaultFileSet = fileset
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rgo/devel/project-template/_env/Project-Template/lib/python3.11/site-packages/pyEDAA/ProjectModel/__init__.py", line 1195, in DefaultFileSet
    raise Exception(f"Fileset '{value}' is not associated to this design.")
Exception: Fileset '/home/rgo/devel/project-template/cores/adder.core/sim/import_list' is not associated to this design.

@DefaultFileSet.setter
def DefaultFileSet(self, value: Union[str, FileSet]) -> None:
if isinstance(value, str):
if (value not in self._fileSets.keys()):
raise Exception(f"Fileset '{value}' is not in this design.")
self._defaultFileSet = self._fileSets[value]
elif isinstance(value, FileSet):
if (value not in self.FileSets):
raise Exception(f"Fileset '{value}' is not associated to this design.")

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingQuestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions